pub trait EmptyList {
type PushFirst<U: 'static>: List;
type RootEmpty: EmptyList;
// Required methods
fn push_first<U>(self, item: U) -> Self::PushFirst<U>
where U: 'static;
fn root_empty() -> Self::RootEmpty;
}Expand description
Trait implemented by empty lists to support list construction.
Required Associated Types§
Required Methods§
Sourcefn push_first<U>(self, item: U) -> Self::PushFirst<U>where
U: 'static,
fn push_first<U>(self, item: U) -> Self::PushFirst<U>where
U: 'static,
Push the first element onto an empty list.
Sourcefn root_empty() -> Self::RootEmpty
fn root_empty() -> Self::RootEmpty
Return the canonical empty list.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".