Struct array_map::ArraySet [−][src]
#[must_use]pub struct ArraySet<K, const N: usize> { /* fields omitted */ }
Expand description
A set backed by an array. All possible keys must be known statically.
This set is O(1) for all operations
Implementations
impl<K: Indexable, const N: usize> ArraySet<K, N>
[src]
impl<K: Indexable, const N: usize> ArraySet<K, N>
[src]#[must_use]pub fn contains(&self, t: K) -> bool
[src]
#[must_use]pub fn contains(&self, t: K) -> bool
[src]Determines whether a key already exists in the set
pub fn insert(&mut self, t: K) -> bool
[src]
pub fn insert(&mut self, t: K) -> bool
[src]Inserts a key into the set and returns whether it was already contained in the set
pub fn remove(&mut self, t: K) -> bool
[src]
pub fn remove(&mut self, t: K) -> bool
[src]Removes a key from the set and returns whether it was already contained in the set
Trait Implementations
impl<'de, K: Deserialize<'de> + Indexable, const N: usize> Deserialize<'de> for ArraySet<K, N>
[src]
impl<'de, K: Deserialize<'de> + Indexable, const N: usize> Deserialize<'de> for ArraySet<K, N>
[src]fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<K: Indexable, const M: usize, const S: usize> From<&'_ ArrayMap<K, AtomicBool, M>> for ArraySet<K, S>
[src]
impl<K: Indexable, const M: usize, const S: usize> From<&'_ ArrayMap<K, AtomicBool, M>> for ArraySet<K, S>
[src]fn from(m: &ArrayMap<K, AtomicBool, M>) -> Self
[src]
fn from(m: &ArrayMap<K, AtomicBool, M>) -> Self
[src]Performs the conversion.
impl<K: Indexable, const M: usize, const S: usize> From<ArrayMap<K, bool, M>> for ArraySet<K, S>
[src]
impl<K: Indexable, const M: usize, const S: usize> From<ArrayMap<K, bool, M>> for ArraySet<K, S>
[src]impl<K: Indexable, const M: usize, const S: usize> From<ArraySet<K, S>> for ArrayMap<K, bool, M>
[src]
impl<K: Indexable, const M: usize, const S: usize> From<ArraySet<K, S>> for ArrayMap<K, bool, M>
[src]impl<K: Indexable, const M: usize, const S: usize> From<ArraySet<K, S>> for ArrayMap<K, AtomicBool, M>
[src]
impl<K: Indexable, const M: usize, const S: usize> From<ArraySet<K, S>> for ArrayMap<K, AtomicBool, M>
[src]impl<K: Indexable, const N: usize> FromIterator<K> for ArraySet<K, N>
[src]
impl<K: Indexable, const N: usize> FromIterator<K> for ArraySet<K, N>
[src]fn from_iter<I: IntoIterator<Item = K>>(iter: I) -> Self
[src]
fn from_iter<I: IntoIterator<Item = K>>(iter: I) -> Self
[src]Creates a value from an iterator. Read more
impl<K: Serialize + Indexable, const N: usize> Serialize for ArraySet<K, N>
[src]
impl<K: Serialize + Indexable, const N: usize> Serialize for ArraySet<K, N>
[src]fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]Serialize this value into the given Serde serializer. Read more
impl<K, const N: usize> Copy for ArraySet<K, N>
[src]
impl<K, const N: usize> Eq for ArraySet<K, N>
[src]
Auto Trait Implementations
impl<K, const N: usize> Send for ArraySet<K, N>
impl<K, const N: usize> Sync for ArraySet<K, N>
impl<K, const N: usize> Unpin for ArraySet<K, N>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,