spirt::cfgssa::data

Struct FixedFlatMap

source
pub struct FixedFlatMap<K, V, VS: ValueStorage<V> = EfficientValue> {
    occupied: u64,
    slots: VS::LazyBox<[VS::Slot; 64]>,
    _marker: PhantomData<K>,
}

Fields§

§occupied: u64§slots: VS::LazyBox<[VS::Slot; 64]>§_marker: PhantomData<K>

Implementations§

source§

impl FixedFlatMap<usize, (), IgnoreValue>

source

pub const SIZE: usize = 64usize

source§

impl<K: Copy + Into<usize> + From<usize>> FixedFlatMap<K, (), IgnoreValue>

source

pub fn union(&self, other: &Self) -> Self

source§

impl<K: Copy + Into<usize> + From<usize>, V, VS: ValueStorage<V>> FixedFlatMap<K, V, VS>

source

pub fn new() -> Self

source

pub fn contains(&self, k: K) -> bool

source

pub fn get(&self, k: K) -> Option<&V>

source

pub fn entry(&mut self, k: K) -> FixedFlatMapEntry<'_, V, VS>

source

pub fn insert(&mut self, k: K, v: V)

source

fn remove(&mut self, k: K) -> Option<V>

source

pub fn keys(&self) -> impl Iterator<Item = K>

source

pub fn iter(&self) -> impl Iterator<Item = (K, &V)> + '_

source

pub fn drain(&mut self) -> impl Iterator<Item = (K, V)> + '_

source

pub fn clear(&mut self)

Trait Implementations§

source§

impl<K: Copy + Into<usize> + From<usize>, V, VS: ValueStorage<V>> Default for FixedFlatMap<K, V, VS>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<K> PartialEq for FixedFlatMap<K, (), IgnoreValue>

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<K, V, VS> Freeze for FixedFlatMap<K, V, VS>
where <VS as ValueStorage<V>>::LazyBox<[<VS as ValueStorage<V>>::Slot; 64]>: Freeze,

§

impl<K, V, VS> RefUnwindSafe for FixedFlatMap<K, V, VS>
where <VS as ValueStorage<V>>::LazyBox<[<VS as ValueStorage<V>>::Slot; 64]>: RefUnwindSafe, K: RefUnwindSafe,

§

impl<K, V, VS> Send for FixedFlatMap<K, V, VS>
where <VS as ValueStorage<V>>::LazyBox<[<VS as ValueStorage<V>>::Slot; 64]>: Send, K: Send,

§

impl<K, V, VS> Sync for FixedFlatMap<K, V, VS>
where <VS as ValueStorage<V>>::LazyBox<[<VS as ValueStorage<V>>::Slot; 64]>: Sync, K: Sync,

§

impl<K, V, VS> Unpin for FixedFlatMap<K, V, VS>
where <VS as ValueStorage<V>>::LazyBox<[<VS as ValueStorage<V>>::Slot; 64]>: Unpin, K: Unpin,

§

impl<K, V, VS> UnwindSafe for FixedFlatMap<K, V, VS>
where <VS as ValueStorage<V>>::LazyBox<[<VS as ValueStorage<V>>::Slot; 64]>: UnwindSafe, K: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.