pub enum List<'a, T> {
Item {
head: &'a T,
rest: &'a Self,
},
Empty,
}
Expand description
The bridge between a TypeSlice
and runtime logic,
allowing access to elements defined at the type level.
Supports iteration and indexing, with adapters for compile time use.
Variants§
Implementations§
Source§impl<'a, T> List<'a, T>
impl<'a, T> List<'a, T>
Sourcepub const fn into_option(self) -> Option<(&'a T, &'a Self)>
pub const fn into_option(self) -> Option<(&'a T, &'a Self)>
Return None
if this list is empty, else the next item and its successor.
Trait Implementations§
Source§impl<'a, T> IntoIterator for List<'a, T>
impl<'a, T> IntoIterator for List<'a, T>
Source§impl<'a, T: Ord> Ord for List<'a, T>
impl<'a, T: Ord> Ord for List<'a, T>
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<'a, T: PartialOrd> PartialOrd for List<'a, T>
impl<'a, T: PartialOrd> PartialOrd for List<'a, T>
impl<'a, T> Copy for List<'a, T>
impl<'a, T: Eq> Eq for List<'a, T>
impl<'a, T> StructuralPartialEq for List<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for List<'a, T>
impl<'a, T> RefUnwindSafe for List<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for List<'a, T>where
T: Sync,
impl<'a, T> Sync for List<'a, T>where
T: Sync,
impl<'a, T> Unpin for List<'a, T>
impl<'a, T> UnwindSafe for List<'a, T>where
T: RefUnwindSafe,
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