Skip to main content

CNil

Struct CNil 

Source
pub struct CNil<T: CStackListHeadLimit>(/* private fields */);
Expand description

Empty repr(C) list used as the tail sentinel for CStackList.

Trait Implementations§

Source§

impl<T: CStackListHeadLimit> CStackListHeadLimit for CNil<T>

Source§

const HEAD_LIMIT: usize = T::HEAD_LIMIT

The offset to the end of the head element.
Source§

impl<T: Clone + CStackListHeadLimit> Clone for CNil<T>

Source§

fn clone(&self) -> CNil<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: CStackListHeadLimit> Debug for CNil<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: CStackListHeadLimit> EmptyList for CNil<T>

Source§

type PushFirst<U: 'static> = CStackList<U, CNil<T>>

The result of pushing the first element onto an empty list.
Source§

type RootEmpty = CNil<()>

The canonical empty list type for this family.
Source§

fn push_first<U: 'static>(self, item: U) -> Self::PushFirst<U>

Push the first element onto an empty list.
Source§

fn root_empty() -> Self::RootEmpty

Return the canonical empty list.
Source§

impl IntoRustTuple for CNil<()>

Source§

type Tuple = ()

The native tuple type with fields in logical source order.
Source§

fn into_rust_tuple(self) -> Self::Tuple

Moves each logical field into the corresponding native tuple field. Read more
Source§

impl<T: CStackListHeadLimit, P: ListTypeProperty> ListTypeIteratorAdvance<P> for CNil<T>

Source§

fn advancer<R: List>(_iter: &mut ListTypeIterator<R, P>) -> Option<P::Output>

Advance the iterator, returning the next property value.
Source§

impl<T: List + CStackListHeadLimit, O: List> PartialEq<O> for CNil<T>

Source§

fn eq(&self, other: &O) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StackResult for CNil<()>

Source§

unsafe fn take_result(_stack: &mut RawStack) -> Undefined

Returns the empty-stack marker without reading a nonexistent slot.

Source§

impl ToTypeIdList for CNil<()>

Source§

fn to_stack_info_list() -> Vec<StackInfo>

Returns an empty preloaded stack.

Auto Trait Implementations§

§

impl<T> Freeze for CNil<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for CNil<T>
where T: RefUnwindSafe,

§

impl<T> Send for CNil<T>
where T: Send,

§

impl<T> Sync for CNil<T>
where T: Sync,

§

impl<T> Unpin for CNil<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for CNil<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for CNil<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> List for T
where T: EmptyList,

Source§

const LENGTH: usize = const LENGTH: usize = 0;

The length of the list, computed at compile time.
Source§

type Empty = <T as EmptyList>::RootEmpty

The type returned by List::empty().
Source§

type Head = Undefined

The type of head.
Source§

type Tail = T

The type of the rest of the list.
Source§

type Push<U: 'static> = <T as EmptyList>::PushFirst<U>

The type of the list after pushing a new value.
Source§

type Append<U: List> = U

The style of List appended to Self
Source§

type ReverseOnto<U: List> = U

The resulting list when reversing Self onto U.
Source§

fn empty() -> <T as List>::Empty

Returns a new empty list that can be used to create a list with the same characteristics.
Source§

fn head(&self) -> &<T as List>::Head

Returns a reference to the head.
Source§

fn tail(&self) -> &<T as List>::Tail

Returns a reference to the rest of the list.
Source§

fn push<U>(self, item: U) -> <T as List>::Push<U>

Pushes a new value onto the front of the list, returning a new list.
Source§

fn append<U>(self, other: U) -> <T as List>::Append<U>
where U: List,

Append U as the tail of Self. Read more
Source§

fn reverse_onto<U>(self, other: U) -> <T as List>::ReverseOnto<U>
where U: List,

Reverse Self and append the result to other.
Source§

fn is_empty(&self) -> bool

Returns true if the list is empty.
Source§

fn len(&self) -> usize

Returns the length of the list.
Source§

fn reverse(self) -> Self::ReverseOnto<Self::Empty>
where Self: Sized,

Reverse this list, returning a new list with elements in opposite order.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.