pub struct Cons<T, L>(pub T, pub L);
Expand description
The type used for a non-empty array. Analogous to a cons cell in a linked list.
Tuple Fields§
§0: T
§1: L
Trait Implementations§
Source§impl<T, L: Array<T>> Array<T> for Cons<T, L>
impl<T, L: Array<T>> Array<T> for Cons<T, L>
Source§impl<T: Ord, L: Ord> Ord for Cons<T, L>
impl<T: Ord, L: Ord> Ord for Cons<T, L>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, L: PartialOrd> PartialOrd for Cons<T, L>
impl<T: PartialOrd, L: PartialOrd> PartialOrd for Cons<T, L>
impl<T: Copy, L: Copy> Copy for Cons<T, L>
impl<T: Eq, L: Eq> Eq for Cons<T, L>
impl<T, L> StructuralPartialEq for Cons<T, L>
Auto Trait Implementations§
impl<T, L> Freeze for Cons<T, L>
impl<T, L> RefUnwindSafe for Cons<T, L>where
T: RefUnwindSafe,
L: RefUnwindSafe,
impl<T, L> Send for Cons<T, L>
impl<T, L> Sync for Cons<T, L>
impl<T, L> Unpin for Cons<T, L>
impl<T, L> UnwindSafe for Cons<T, L>where
T: UnwindSafe,
L: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more