[−][src]Struct orga::collections::Set
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,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Set<S, T> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<S, T> Sync for Set<S, T> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<S, T> Terminated for Set<S, T> where
S: Terminated,
T: Terminated,
S: Terminated,
T: Terminated,
impl<S, T> Unpin for Set<S, T> where
S: Unpin,
T: Unpin,
S: Unpin,
T: Unpin,
impl<S, T> UnwindSafe for Set<S, T> where
S: UnwindSafe,
T: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,