pub struct ArchivedIndexSet<K, H = FxHasher64> { /* private fields */ }
Expand description

An archived IndexSet.

Implementations§

source§

impl<K, H> ArchivedIndexSet<K, H>

source

pub fn is_empty(&self) -> bool

Returns whether the index set contains no values.

source

pub fn iter(&self) -> Keys<'_, K, ()>

Returns an iterator over the keys of the index set in order.

source

pub fn len(&self) -> usize

Returns the number of elements in the index set.

source§

impl<K, H: Default + Hasher> ArchivedIndexSet<K, H>

source

pub fn contains<Q>(&self, k: &Q) -> bool
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Returns whether a key is present in the hash set.

source

pub fn get<Q>(&self, k: &Q) -> Option<&K>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Returns the value stored in the set, if any.

source

pub fn get_full<Q>(&self, k: &Q) -> Option<(usize, &K)>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Returns the item index and value stored in the set, if any.

source

pub fn get_index(&self, index: usize) -> Option<&K>

Gets a key by index.

source

pub fn get_index_of<Q>(&self, key: &Q) -> Option<usize>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Returns the index of a key if it exists in the set.

source

pub unsafe fn resolve_from_len( len: usize, load_factor: (usize, usize), pos: usize, resolver: IndexSetResolver, out: *mut Self )

Resolves an archived index map from a given length and parameters.

§Safety

out must point to a Self that properly aligned and valid for writes.

source

pub fn serialize_from_iter<'a, I, UK, S>( iter: I, load_factor: (usize, usize), serializer: &mut S ) -> Result<IndexSetResolver, S::Error>
where I: Clone + ExactSizeIterator<Item = &'a UK>, UK: 'a + Serialize<S, Archived = K> + Hash + Eq, S: Fallible + Writer + Allocator + ?Sized, S::Error: Error,

Serializes an iterator of keys as an index set.

Trait Implementations§

source§

impl<K, H, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedIndexSet<K, H>
where <__C as Fallible>::Error: Trace, ArchivedIndexMap<K, (), H>: CheckBytes<__C>,

source§

unsafe fn check_bytes( value: *const Self, context: &mut __C ) -> Result<(), <__C as Fallible>::Error>

Checks whether the given pointer points to a valid value within the given context. Read more
source§

impl<K: Debug, H> Debug for ArchivedIndexSet<K, H>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<K: PartialEq, H> PartialEq for ArchivedIndexSet<K, H>

source§

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

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

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<K: Eq, H> Eq for ArchivedIndexSet<K, H>

source§

impl<K, H> Portable for ArchivedIndexSet<K, H>

Auto Trait Implementations§

§

impl<K, H> Freeze for ArchivedIndexSet<K, H>

§

impl<K, H> RefUnwindSafe for ArchivedIndexSet<K, H>

§

impl<K, H> Send for ArchivedIndexSet<K, H>
where H: Send, K: Send,

§

impl<K, H> Sync for ArchivedIndexSet<K, H>
where H: Sync, K: Sync,

§

impl<K, H = FxHasher64> !Unpin for ArchivedIndexSet<K, H>

§

impl<K, H> UnwindSafe for ArchivedIndexSet<K, H>
where H: 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> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> LayoutRaw for T

source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
source§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

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

§

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

§

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.