Trait Lengthen
unsafe trait Lengthen<T>: Sized + GenericSequence<T>
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
Associated Types
type Longer: TraitBound { trait_: Path { path: "Shorten", id: Id(143), args: Some(AngleBracketed { args: [Type(Generic("T"))], constraints: [AssocItemConstraint { name: "Shorter", args: None, binding: Equality(Type(Generic("Self"))) }] }) }, generic_params: [], modifier: None }GenericSequencethat has one more element thanSelf
Required Methods
fn append(self: Self, last: T) -> <Self as >::LongerReturns a new array with the given element appended to the end of it.
Example:
# use ; #fn prepend(self: Self, first: T) -> <Self as >::LongerReturns a new array with the given element prepended to the front of it.
Example:
# use ; #
Implementors
impl<T, N> Lengthen for GenericArray<T, N>