Struct rkyv::std_impl::chd::ArchivedHashSet[][src]

#[repr(transparent)]
pub struct ArchivedHashSet<K: Hash + Eq>(_);

An archived HashSet. This is a wrapper around a hash map with the same key and a value of ().

Implementations

impl<K: Hash + Eq> ArchivedHashSet<K>[src]

pub fn len(&self) -> usize[src]

Gets the number of items in the hash set.

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

Gets the key corresponding to the given key in the hash set.

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

Returns whether the given key is in the hash set.

pub fn hasher(&self) -> SeaHasher[src]

Gets the hasher for the underlying hash map.

pub fn is_empty(&self) -> bool[src]

Returns whether there are no items in the hash set.

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

Notable traits for Keys<'a, K, V>

impl<'a, K: Hash + Eq, V> Iterator for Keys<'a, K, V> type Item = &'a K;
[src]

Gets an iterator over the keys of the underlying hash map.

Trait Implementations

impl<K: CheckBytes<C> + Hash + Eq, C: ArchiveBoundsContext + ArchiveMemoryContext + Fallible + ?Sized> CheckBytes<C> for ArchivedHashSet<K> where
    C::Error: Error
[src]

type Error = HashMapError<K::Error, <() as CheckBytes<C>>::Error, C::Error>

The error that may result from checking the type.

impl<K: Eq + Hash> Eq for ArchivedHashSet<K>[src]

impl<K: PartialEq + Hash + Eq> PartialEq<ArchivedHashSet<K>> for ArchivedHashSet<K>[src]

impl<K: Hash + Eq> StructuralEq for ArchivedHashSet<K>[src]

impl<K: Hash + Eq> StructuralPartialEq for ArchivedHashSet<K>[src]

Auto Trait Implementations

impl<K> RefUnwindSafe for ArchivedHashSet<K> where
    K: RefUnwindSafe

impl<K> Send for ArchivedHashSet<K> where
    K: Send

impl<K> Sync for ArchivedHashSet<K> where
    K: Sync

impl<K> !Unpin for ArchivedHashSet<K>

impl<K> UnwindSafe for ArchivedHashSet<K> where
    K: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointee for T[src]

type Metadata = ()

The type for metadata in pointers and references to Self.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.