Trait AsImOrdSet

Source
pub trait AsImOrdSet<A: Ord + Clone>: Clone {
    // Required methods
    fn insert(&mut self, a: A) -> Option<A>;
    fn remove<BA: Ord>(&mut self, a: &BA) -> Option<A>
       where A: Borrow<BA>;

    // Provided methods
    fn to_inserted(&mut self, a: A) -> (Self, Option<A>) { ... }
    fn to_removed<BA: Ord>(&self, a: &BA) -> (Self, Option<A>)
       where A: Borrow<BA> { ... }
    fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Self
       where Self: Extend<A> { ... }
    fn iter_clone(&self) -> Self::IntoIter
       where Self: IntoIterator { ... }
}

Required Methods§

Source

fn insert(&mut self, a: A) -> Option<A>

Source

fn remove<BA: Ord>(&mut self, a: &BA) -> Option<A>
where A: Borrow<BA>,

Provided Methods§

Source

fn to_inserted(&mut self, a: A) -> (Self, Option<A>)

Source

fn to_removed<BA: Ord>(&self, a: &BA) -> (Self, Option<A>)
where A: Borrow<BA>,

Source

fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Self
where Self: Extend<A>,

Source

fn iter_clone(&self) -> Self::IntoIter
where Self: IntoIterator,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A: Ord + Clone> AsImOrdSet<A> for OrdSet<A>

Source§

fn insert(&mut self, a: A) -> Option<A>

Source§

fn remove<BA>(&mut self, a: &BA) -> Option<A>
where BA: Ord + ?Sized, A: Borrow<BA>,

Source§

impl<A: Ord + Clone> AsImOrdSet<A> for OrdSet<A>

Source§

fn insert(&mut self, a: A) -> Option<A>

Source§

fn remove<BA>(&mut self, a: &BA) -> Option<A>
where BA: Ord + ?Sized, A: Borrow<BA>,

Implementors§