[][src]Struct sled_extensions::expiring::TreeBuilder

pub struct TreeBuilder<V, E, F> { /* fields omitted */ }

A builder for creating expiring trees.

This allows setting expiration duration and whether to extend the duration of a value on fetch or update.

Methods

impl<V, E, F> ExpiringTreeBuilder<V, E, F> where
    E: Encoding<HashSet<IVec>> + Encoding<DateTime<Utc>> + 'static,
    F: Encoding<V> + 'static, 
[src]

pub fn extend_on_update(&mut self) -> &mut Self[src]

Create a tree that extends the duration of a record when that record is updated

pub fn extend_on_fetch(&mut self) -> &mut Self[src]

Create a tree that extends the duration of a record when that record is fetched

pub fn expiration_length(&mut self, expiration_length: Duration) -> &mut Self[src]

Create a tree with a custom record duration

pub fn build(&self) -> Result<ExpiringTree<V, E, F>>[src]

Create the tree

Auto Trait Implementations

impl<V, E, F> Send for ExpiringTreeBuilder<V, E, F> where
    E: Send,
    F: Send,
    V: Send

impl<V, E, F> Sync for ExpiringTreeBuilder<V, E, F> where
    E: Sync,
    F: Sync,
    V: Sync

impl<V, E, F> Unpin for ExpiringTreeBuilder<V, E, F> where
    E: Unpin,
    F: Unpin,
    V: Unpin

impl<V, E, F> !UnwindSafe for ExpiringTreeBuilder<V, E, F>

impl<V, E, F> !RefUnwindSafe for ExpiringTreeBuilder<V, E, F>

Blanket Implementations

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

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

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.

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

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

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