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.
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>
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".