//go:build !no_gotd_slices
// +build !no_gotd_slices

// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// PasswordKdfAlgoClassArray is adapter for slice of PasswordKdfAlgoClass.
type PasswordKdfAlgoClassArray []PasswordKdfAlgoClass

// Sort sorts slice of PasswordKdfAlgoClass.
func ( PasswordKdfAlgoClassArray) ( func(,  PasswordKdfAlgoClass) bool) PasswordKdfAlgoClassArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of PasswordKdfAlgoClass.
func ( PasswordKdfAlgoClassArray) ( func(,  PasswordKdfAlgoClass) bool) PasswordKdfAlgoClassArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of PasswordKdfAlgoClass.
func ( PasswordKdfAlgoClassArray) ( func( PasswordKdfAlgoClass) bool) PasswordKdfAlgoClassArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( PasswordKdfAlgoClassArray) () ( PasswordKdfAlgoClass,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( PasswordKdfAlgoClassArray) () ( PasswordKdfAlgoClass,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *PasswordKdfAlgoClassArray) () ( PasswordKdfAlgoClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  PasswordKdfAlgoClass
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *PasswordKdfAlgoClassArray) () ( PasswordKdfAlgoClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// AsPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow returns copy with only PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow constructors.
func ( PasswordKdfAlgoClassArray) () ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) {
	for ,  := range  {
		,  := .(*PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray is adapter for slice of PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.
type PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray []PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow

// Sort sorts slice of PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.
func ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) ( func(,  PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) bool) PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.
func ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) ( func(,  PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) bool) PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.
func ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) ( func( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) bool) PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) () ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) () ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) () ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowArray) () ( PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}