pub struct KeymapBuilder<'a, K, T, Ser = Bincode2, I = WithIter> { /* private fields */ }

Implementations§

source§

impl<'a, K, T, Ser> KeymapBuilder<'a, K, T, Ser, WithIter>

source

pub const fn new(namespace: &'a [u8]) -> Self

Creates a KeymapBuilder with default features

source

pub const fn with_page_size(&self, indexes_size: u32) -> Self

Modifies the number of keys stored in one page of indexing, for the iterator

source

pub const fn without_iter(&self) -> KeymapBuilder<'a, K, T, Ser, WithoutIter>

Disables the iterator of the keymap, saving at least 4000 gas in each insertion.

source

pub const fn build(&self) -> Keymap<'a, K, T, Ser, WithIter>

Returns a keymap with the given configuration

source§

impl<'a, K, T, Ser> KeymapBuilder<'a, K, T, Ser, WithoutIter>

source

pub const fn build(&self) -> Keymap<'a, K, T, Ser, WithoutIter>

Auto Trait Implementations§

§

impl<'a, K, T, Ser, I> RefUnwindSafe for KeymapBuilder<'a, K, T, Ser, I>

§

impl<'a, K, T, Ser, I> Send for KeymapBuilder<'a, K, T, Ser, I>
where I: Send, K: Send, Ser: Send, T: Send,

§

impl<'a, K, T, Ser, I> Sync for KeymapBuilder<'a, K, T, Ser, I>
where I: Sync, K: Sync, Ser: Sync, T: Sync,

§

impl<'a, K, T, Ser, I> Unpin for KeymapBuilder<'a, K, T, Ser, I>
where I: Unpin, K: Unpin, Ser: Unpin, T: Unpin,

§

impl<'a, K, T, Ser, I> UnwindSafe for KeymapBuilder<'a, K, T, Ser, I>
where I: UnwindSafe, K: UnwindSafe, Ser: UnwindSafe, T: 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> Same for T

§

type Output = T

Should always be 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.