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
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: 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>,