Skip to main content

IContainer

Trait IContainer 

Source
pub trait IContainer<A: IVm>: IComplex<A> {
    type Header: PartialEq + Clone;
    type Item: Debug + Clone;
    type Items: ?Sized + SizedIndex<usize, Output = Self::Item>;

    // Required methods
    fn new<E>(
        header: Self::Header,
        i: impl IntoIterator<Item = Result<Self::Item, E>>,
    ) -> Result<Self, E>;
    fn header(&self) -> &Self::Header;
    fn items(&self) -> &Self::Items;

    // Provided methods
    fn new_ok(
        header: Self::Header,
        i: impl IntoIterator<Item = Self::Item>,
    ) -> Self { ... }
    fn items_eq(&self, b: &Self) -> bool
       where Self::Header: PartialEq,
             Self::Item: PartialEq { ... }
}
Expand description

A sequence with a header: a string, a bigint, an array, an object.

Required Associated Types§

Required Methods§

Source

fn new<E>( header: Self::Header, i: impl IntoIterator<Item = Result<Self::Item, E>>, ) -> Result<Self, E>

Source

fn header(&self) -> &Self::Header

Source

fn items(&self) -> &Self::Items

Provided Methods§

Source

fn new_ok(header: Self::Header, i: impl IntoIterator<Item = Self::Item>) -> Self

Source

fn items_eq(&self, b: &Self) -> bool
where Self::Header: PartialEq, Self::Item: PartialEq,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§