Struct CStackList
#[repr(C)]pub struct CStackList<H, T>(pub T, pub H)
where
T: CStackListHeadLimit;Expand description
A list using a guaranteed memory layout (repr(C)), with tail stored first so appending items
does not change the memory layout of prior items.
Cloning copies each field according to its Clone contract. Equality compares
lengths and corresponding logical fields, independently of physical layout.
§Examples
use cel_runtime::IntoCStackList;
let list = (String::from("owned"), 7u8).into_c_stack_list();
assert_eq!(list, list.clone());Tuple Fields§
§0: T§1: HTrait Implementations§
§impl<H, T> CStackListHeadLimit for CStackList<H, T>where
H: 'static,
T: CStackListHeadLimit,
impl<H, T> CStackListHeadLimit for CStackList<H, T>where
H: 'static,
T: CStackListHeadLimit,
§const HEAD_LIMIT: usize
const HEAD_LIMIT: usize
§impl<H, T> CStackListHeadPadded for CStackList<H, T>where
H: 'static,
T: CStackListHeadLimit,
impl<H, T> CStackListHeadPadded for CStackList<H, T>where
H: 'static,
T: CStackListHeadLimit,
§const HEAD_PADDED: bool
const HEAD_PADDED: bool
§impl<H, T> Clone for CStackList<H, T>
impl<H, T> Clone for CStackList<H, T>
§fn clone(&self) -> CStackList<H, T>
fn clone(&self) -> CStackList<H, T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<H, T> Debug for CStackList<H, T>
impl<H, T> Debug for CStackList<H, T>
§impl<H, T, Idx> Index<Idx> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
CStackList<H, T>: ListIndex<Idx>,
<CStackList<H, T> as ListIndex<Idx>>::Output: Sized,
impl<H, T, Idx> Index<Idx> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
CStackList<H, T>: ListIndex<Idx>,
<CStackList<H, T> as ListIndex<Idx>>::Output: Sized,
§impl<A> IntoRustTuple for CStackList<A, CNil<()>>where
A: 'static,
impl<A> IntoRustTuple for CStackList<A, CNil<()>>where
A: 'static,
§fn into_rust_tuple(self) -> <CStackList<A, CNil<()>> as IntoRustTuple>::Tuple
fn into_rust_tuple(self) -> <CStackList<A, CNil<()>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§impl<A, B> IntoRustTuple for CStackList<A, CStackList<B, CNil<()>>>where
A: 'static,
B: 'static,
impl<A, B> IntoRustTuple for CStackList<A, CStackList<B, CNil<()>>>where
A: 'static,
B: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CNil<()>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CNil<()>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§impl<A, B, C> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CNil<()>>>>where
A: 'static,
B: 'static,
C: 'static,
impl<A, B, C> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CNil<()>>>>where
A: 'static,
B: 'static,
C: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CNil<()>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CNil<()>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§impl<A, B, C, D> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CNil<()>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
impl<A, B, C, D> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CNil<()>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CNil<()>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CNil<()>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D)
type Tuple = (A, B, C, D)
§impl<A, B, C, D, E> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CNil<()>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
impl<A, B, C, D, E> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CNil<()>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CNil<()>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CNil<()>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E)
type Tuple = (A, B, C, D, E)
§impl<A, B, C, D, E, F> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CNil<()>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
impl<A, B, C, D, E, F> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CNil<()>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CNil<()>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CNil<()>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F)
type Tuple = (A, B, C, D, E, F)
§impl<A, B, C, D, E, F, G> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CNil<()>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
impl<A, B, C, D, E, F, G> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CNil<()>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CNil<()>>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CNil<()>>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F, G)
type Tuple = (A, B, C, D, E, F, G)
§impl<A, B, C, D, E, F, G, H> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CNil<()>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
impl<A, B, C, D, E, F, G, H> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CNil<()>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CNil<()>>>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CNil<()>>>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F, G, H)
type Tuple = (A, B, C, D, E, F, G, H)
§impl<A, B, C, D, E, F, G, H, I> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CNil<()>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
impl<A, B, C, D, E, F, G, H, I> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CNil<()>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CNil<()>>>>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CNil<()>>>>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F, G, H, I)
type Tuple = (A, B, C, D, E, F, G, H, I)
§impl<A, B, C, D, E, F, G, H, I, J> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CNil<()>>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
J: 'static,
impl<A, B, C, D, E, F, G, H, I, J> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CNil<()>>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
J: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CNil<()>>>>>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CNil<()>>>>>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F, G, H, I, J)
type Tuple = (A, B, C, D, E, F, G, H, I, J)
§impl<A, B, C, D, E, F, G, H, I, J, K> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CNil<()>>>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
J: 'static,
K: 'static,
impl<A, B, C, D, E, F, G, H, I, J, K> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CNil<()>>>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
J: 'static,
K: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CNil<()>>>>>>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CNil<()>>>>>>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F, G, H, I, J, K)
type Tuple = (A, B, C, D, E, F, G, H, I, J, K)
§impl<A, B, C, D, E, F, G, H, I, J, K, L> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CStackList<L, CNil<()>>>>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
J: 'static,
K: 'static,
L: 'static,
impl<A, B, C, D, E, F, G, H, I, J, K, L> IntoRustTuple for CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CStackList<L, CNil<()>>>>>>>>>>>>>where
A: 'static,
B: 'static,
C: 'static,
D: 'static,
E: 'static,
F: 'static,
G: 'static,
H: 'static,
I: 'static,
J: 'static,
K: 'static,
L: 'static,
§fn into_rust_tuple(
self,
) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CStackList<L, CNil<()>>>>>>>>>>>>> as IntoRustTuple>::Tuple
fn into_rust_tuple( self, ) -> <CStackList<A, CStackList<B, CStackList<C, CStackList<D, CStackList<E, CStackList<F, CStackList<G, CStackList<H, CStackList<I, CStackList<J, CStackList<K, CStackList<L, CNil<()>>>>>>>>>>>>> as IntoRustTuple>::Tuple
Moves the canonical fields into their corresponding native tuple positions.
- Complexity: O(n) field moves for n fields, without allocation.
§type Tuple = (A, B, C, D, E, F, G, H, I, J, K, L)
type Tuple = (A, B, C, D, E, F, G, H, I, J, K, L)
§impl<H, T> List for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
impl<H, T> List for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
§fn empty() -> <CStackList<H, T> as List>::Empty
fn empty() -> <CStackList<H, T> as List>::Empty
Creates the canonical empty list without borrowing this list’s values.
§fn head(&self) -> &<CStackList<H, T> as List>::Head
fn head(&self) -> &<CStackList<H, T> as List>::Head
Borrows the first logical field.
§fn tail(&self) -> &<CStackList<H, T> as List>::Tail
fn tail(&self) -> &<CStackList<H, T> as List>::Tail
Borrows the remaining logical fields.
§fn push<U>(self, item: U) -> <CStackList<H, T> as List>::Push<U>where
U: 'static,
fn push<U>(self, item: U) -> <CStackList<H, T> as List>::Push<U>where
U: 'static,
Moves a new first field and this list into their canonical node.
§fn append<U>(self, other: U) -> <CStackList<H, T> as List>::Append<U>where
U: List,
fn append<U>(self, other: U) -> <CStackList<H, T> as List>::Append<U>where
U: List,
Moves these fields before other without cloning them.
- Complexity: O(n) field moves for n fields in this list.
§fn reverse_onto<U>(self, other: U) -> <CStackList<H, T> as List>::ReverseOnto<U>where
U: List,
fn reverse_onto<U>(self, other: U) -> <CStackList<H, T> as List>::ReverseOnto<U>where
U: List,
Moves these fields in reverse order before other.
- Complexity: O(n) field moves for n fields in this list.
§type Empty = CNil<()>
type Empty = CNil<()>
List::empty().§type Push<U: 'static> = CStackList<U, CStackList<H, T>>
type Push<U: 'static> = CStackList<U, CStackList<H, T>>
§type ReverseOnto<U: List> = <T as List>::ReverseOnto<<U as List>::Push<H>>
type ReverseOnto<U: List> = <T as List>::ReverseOnto<<U as List>::Push<H>>
Self onto U.§impl<H, T, U, B> ListIndex<RangeFrom<UInt<U, B>>> for CStackList<H, T>
impl<H, T, U, B> ListIndex<RangeFrom<UInt<U, B>>> for CStackList<H, T>
§impl<H, T> ListIndex<RangeFrom<UTerm>> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
impl<H, T> ListIndex<RangeFrom<UTerm>> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
§impl<H, T, U, B> ListIndex<RangeTo<UInt<U, B>>> for CStackList<H, T>
impl<H, T, U, B> ListIndex<RangeTo<UInt<U, B>>> for CStackList<H, T>
§impl<H, T> ListIndex<RangeTo<UTerm>> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
impl<H, T> ListIndex<RangeTo<UTerm>> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
§impl<H, T, U, B> ListIndex<RangeToInclusive<UInt<U, B>>> for CStackList<H, T>
impl<H, T, U, B> ListIndex<RangeToInclusive<UInt<U, B>>> for CStackList<H, T>
§fn index(
&self,
_index: RangeToInclusive<UInt<U, B>>,
) -> &<CStackList<H, T> as ListIndex<RangeToInclusive<UInt<U, B>>>>::Output
fn index( &self, _index: RangeToInclusive<UInt<U, B>>, ) -> &<CStackList<H, T> as ListIndex<RangeToInclusive<UInt<U, B>>>>::Output
Borrows the type-checked inclusive prefix in place.
§impl<H, T> ListIndex<RangeToInclusive<UTerm>> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
impl<H, T> ListIndex<RangeToInclusive<UTerm>> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
§fn index(
&self,
_index: RangeToInclusive<UTerm>,
) -> &<CStackList<H, T> as ListIndex<RangeToInclusive<UTerm>>>::Output
fn index( &self, _index: RangeToInclusive<UTerm>, ) -> &<CStackList<H, T> as ListIndex<RangeToInclusive<UTerm>>>::Output
Borrows the singleton prefix without moving the backing tail.
§type Output = CStackList<H, CNil<T>>
type Output = CStackList<H, CNil<T>>
Idx.§impl<H, T, U, B> ListIndex<UInt<U, B>> for CStackList<H, T>
impl<H, T, U, B> ListIndex<UInt<U, B>> for CStackList<H, T>
§impl<H, T> ListIndex<UTerm> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
impl<H, T> ListIndex<UTerm> for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
§impl<P, H, T> ListTypeIteratorAdvance<P> for CStackList<H, T>
impl<P, H, T> ListTypeIteratorAdvance<P> for CStackList<H, T>
§fn advancer<R>(
iter: &mut ListTypeIterator<R, P>,
) -> Option<<P as ListTypeProperty>::Output>where
R: List,
fn advancer<R>(
iter: &mut ListTypeIterator<R, P>,
) -> Option<<P as ListTypeProperty>::Output>where
R: List,
Generates this head’s property and advances the iterator to its tail.
- Complexity: The property generator’s complexity.
§impl<H, T, O> PartialEq<O> for CStackList<H, T>
impl<H, T, O> PartialEq<O> for CStackList<H, T>
§impl<H, T> StackResult for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
impl<H, T> StackResult for CStackList<H, T>where
H: 'static,
T: List + CStackListHeadLimit,
§unsafe fn take_result(stack: &mut RawStack) -> H
unsafe fn take_result(stack: &mut RawStack) -> H
Transfers the concrete head out of its owned stack slot.
§impl<H, T> ToTypeIdList for CStackList<H, T>where
H: 'static,
T: ToTypeIdList + 'static + CStackListHeadLimit,
impl<H, T> ToTypeIdList for CStackList<H, T>where
H: 'static,
T: ToTypeIdList + 'static + CStackListHeadLimit,
§fn to_stack_info_list() -> Vec<StackInfo>
fn to_stack_info_list() -> Vec<StackInfo>
Enumerates tail storage followed by the opaque head.
- Complexity: O(n) slots for n list elements.