Trait Shorten
unsafe trait Shorten<T>: Sized + GenericSequence<T>
Defines a GenericSequence which can be shortened by removing the first or last element from it.
Additionally, any shortened sequence can be lengthened by appending or prepending an element to it.
Associated Types
type Shorter: TraitBound { trait_: Path { path: "Lengthen", id: Id(145), args: Some(AngleBracketed { args: [Type(Generic("T"))], constraints: [AssocItemConstraint { name: "Longer", args: None, binding: Equality(Type(Generic("Self"))) }] }) }, generic_params: [], modifier: None }GenericSequencethat has one less element thanSelf
Required Methods
fn pop_back(self: Self) -> (<Self as >::Shorter, T)Returns a new array without the last element, and the last element.
Example:
# use ; #fn pop_front(self: Self) -> (T, <Self as >::Shorter)Returns a new array without the first element, and the first element. Example:
# use ; #
Implementors
impl<T, N> Shorten for GenericArray<T, N>