Type Alias async_skipdb::equivalent::AsyncStdEquivalentDb

source ·
pub type AsyncStdEquivalentDb<K, V, S = RandomState> = EquivalentDb<K, V, AsyncStdSpawner, S>;
Available on crate feature async-std only.
Expand description

Database for async-std runtime.

Aliased Type§

struct AsyncStdEquivalentDb<K, V, S = RandomState> { /* private fields */ }

Implementations

source§

impl<K, V, SP: AsyncSpawner> EquivalentDb<K, V, SP>

source

pub async fn new() -> Self

Creates a new EquivalentDb with the given options.

source§

impl<K, V, SP, S> EquivalentDb<K, V, SP, S>
where K: Ord + Hash + Eq, S: BuildHasher + Clone, SP: AsyncSpawner,

source

pub async fn write(&self) -> WriteTransaction<K, V, SP, S>

Create a write transaction.

source

pub async fn write_with_capacity( &self, capacity: usize ) -> WriteTransaction<K, V, SP, S>

Create a write transaction with the given capacity hint.

source§

impl<K, V, SP, S> EquivalentDb<K, V, SP, S>
where K: Ord + Eq + Hash + Send + 'static, V: Send + 'static, SP: AsyncSpawner,

source

pub fn compact(&self)

Compact the database.

source§

impl<K, V, SP: AsyncSpawner, S> EquivalentDb<K, V, SP, S>

source

pub async fn with_hasher(hasher: S) -> Self

Creates a new EquivalentDb with the given hasher.

source

pub async fn version(&self) -> u64

Returns the current read version of the database.

source

pub async fn read( &self ) -> ReadTransaction<K, V, EquivalentDb<K, V, SP, S>, HashCm<K, S>, SP>

Create a read transaction.

Trait Implementations

source§

impl<K, V, SP, S> Clone for EquivalentDb<K, V, SP, S>
where SP: AsyncSpawner,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more