pub trait EmptyList {
type PushFirst<U: 'static>: List;
type RootEmpty: EmptyList;
// Required methods
fn push_first<U: 'static>(self, item: U) -> Self::PushFirst<U>;
fn root_empty() -> Self::RootEmpty;
}Expand description
Trait implemented by empty lists to support list construction.
§Examples
use cel_runtime::{EmptyList, List};
let list = <()>::root_empty().push_first(String::from("owned"));
assert_eq!(list.head(), "owned");Required Associated Types§
Required Methods§
Sourcefn push_first<U: 'static>(self, item: U) -> Self::PushFirst<U>
fn push_first<U: 'static>(self, item: U) -> Self::PushFirst<U>
Sourcefn root_empty() -> Self::RootEmpty
fn root_empty() -> Self::RootEmpty
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".