[][src]Struct smallmap::Page

#[repr(transparent)]pub struct Page<TKey, TValue>(_);

A single page in a Map. Contains up to 256 key-value entries.

Implementations

impl<K, V> Page<K, V> where
    K: Collapse
[src]

pub const fn new() -> Self[src]

Create a new blank page

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

The number of entries currently in this page

This is a count that iterates over all slots, if possible store it in a temporary instead of re-calling it many times.

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

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

impl<'a, K, V> Iterator for PageElements<'a, K, V> type Item = &'a (K, V);
[src]

An iterator over all entries currently in this page

pub fn iter_mut(&mut self) -> PageElementsMut<'_, K, V>

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

impl<'a, K, V> Iterator for PageElementsMut<'a, K, V> type Item = &'a mut (K, V);
[src]

A mutable iterator over all entries currently in this page

Trait Implementations

impl<K: Clone, V: Clone> Clone for Page<K, V>[src]

impl<K: Debug, V: Debug> Debug for Page<K, V>[src]

impl<K, V> Default for Page<K, V> where
    K: Collapse
[src]

impl<K: Eq, V: Eq> Eq for Page<K, V>[src]

impl<K: Hash, V: Hash> Hash for Page<K, V>[src]

impl<K, V> IntoIterator for Page<K, V> where
    K: Collapse
[src]

type Item = (K, V)

The type of the elements being iterated over.

type IntoIter = IntoPageElements<K, V>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Consume this Page into an iterator of all values currently in it.

impl<K: PartialEq, V: PartialEq> PartialEq<Page<K, V>> for Page<K, V>[src]

Auto Trait Implementations

impl<TKey, TValue> RefUnwindSafe for Page<TKey, TValue> where
    TKey: RefUnwindSafe,
    TValue: RefUnwindSafe

impl<TKey, TValue> Send for Page<TKey, TValue> where
    TKey: Send,
    TValue: Send

impl<TKey, TValue> Sync for Page<TKey, TValue> where
    TKey: Sync,
    TValue: Sync

impl<TKey, TValue> Unpin for Page<TKey, TValue> where
    TKey: Unpin,
    TValue: Unpin

impl<TKey, TValue> UnwindSafe for Page<TKey, TValue> where
    TKey: UnwindSafe,
    TValue: UnwindSafe

Blanket Implementations

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

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

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

impl<T> Collapse for T where
    T: Eq + Hash
[src]

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.