pub trait IntoCStackList {
type Output: List;
// Required method
fn into_c_stack_list(self) -> Self::Output;
}Expand description
Converts tuples and list-like values into a source-ordered CStackList.
The first source field becomes the logical head, even though each repr(C)
node physically stores its tail before its head.
§Examples
use cel_runtime::{IntoCStackList, IntoRustTuple};
let list = (String::from("left"), 7_u8).into_c_stack_list();
assert_eq!(list.into_rust_tuple(), (String::from("left"), 7));Required Associated Types§
Required Methods§
Sourcefn into_c_stack_list(self) -> Self::Output
fn into_c_stack_list(self) -> Self::Output
Moves fields into a CStackList, preserving logical source order.
- Complexity: Native tuple conversions take O(n) field moves for n fields, without heap allocation.
§Examples
use cel_runtime::{IntoCStackList, List};
assert_eq!((1_u8, 2_u16).into_c_stack_list().len(), 2);Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".