Skip to main content

ToList

Trait ToList 

Source
pub trait ToList {
    type ToList<T: EmptyList>: List;

    // Required method
    fn to_list<T: EmptyList>(&self) -> Self::ToList<T>;
}
Expand description

Converts to a type-level List without consuming the source.

§Examples

A converter retains its source ownership and states whether its fields are borrowed or independently copied; see IntoList for the consuming bridge.

Required Associated Types§

Source

type ToList<T: EmptyList>: List

The resulting List type using T as the empty list type family.

Required Methods§

Source

fn to_list<T: EmptyList>(&self) -> Self::ToList<T>

Converts to a List using T as the empty list type family.

  • Complexity: The converter’s field borrowing or copying costs.
§Examples

See ToList.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§