Trait coins_bip32::ecdsa::signature::digest::block_buffer::generic_array::sequence::Lengthen
[−]pub unsafe trait Lengthen<T>: GenericSequence<T> {
type Longer: Shorten<T>
where
<Self::Longer as Shorten<T>>::Shorter == Self;
fn append(self, last: T) -> Self::Longer;
fn prepend(self, first: T) -> Self::Longer;
}
Expand description
Defines any GenericSequence
which can be lengthened or extended by appending
or prepending an element to it.
Any lengthened sequence can be shortened back to the original using pop_front
or pop_back
Required Associated Types
Required Methods
Returns a new array with the given element appended to the end of it.
Example:
let a = arr![i32; 1, 2, 3];
let b = a.append(4);
assert_eq!(b, arr![i32; 1, 2, 3, 4]);