[][src]Struct orga::collections::Set

pub struct Set<S: Read, T: Encode + Decode> { /* fields omitted */ }

A set data structure.

Implementations

impl<S: Read, T: Encode + Decode> Set<S, T>[src]

pub fn contains<U: Borrow<T>>(&self, value: U) -> Result<bool>[src]

Return true if the set contains the given value, or false otherwise.

If an error is encountered while accessing the store, it will be returned.

impl<S: Store, T: Encode + Decode> Set<S, T>[src]

pub fn insert(&mut self, value: T) -> Result<()>[src]

Inserts the given value into the set. If the value is already in the set, this is a no-op.

If an error is encountered while writing to the store, it will be returned.

pub fn delete<U: Borrow<T>>(&mut self, value: U) -> Result<()>[src]

Removes the given value from the set.

If the value is not in the set, this method is a no-op. However, it will still issue a deletion to the underlying store which may have some overhead.

If an error is encountered while deleting from the store, it will be returned.

Trait Implementations

impl<S: Read, T: Encode + Decode> State<S> for Set<S, T>[src]

fn wrap_store(store: S) -> Result<Self>[src]

Constructs a Set which is backed by the given store.

Auto Trait Implementations

impl<S, T> RefUnwindSafe for Set<S, T> where
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<S, T> Send for Set<S, T> where
    S: Send,
    T: Send

impl<S, T> Sync for Set<S, T> where
    S: Sync,
    T: Sync

impl<S, T> Terminated for Set<S, T> where
    S: Terminated,
    T: Terminated

impl<S, T> Unpin for Set<S, T> where
    S: Unpin,
    T: Unpin

impl<S, T> UnwindSafe for Set<S, T> where
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,