[−][src]Struct sled_extensions::expiring::TreeBuilder
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]
E: Encoding<HashSet<IVec>> + Encoding<DateTime<Utc>> + 'static,
F: Encoding<V> + 'static,
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,
E: Send,
F: Send,
V: Send,
impl<V, E, F> Sync for ExpiringTreeBuilder<V, E, F> where
E: Sync,
F: Sync,
V: Sync,
E: Sync,
F: Sync,
V: Sync,
impl<V, E, F> Unpin for ExpiringTreeBuilder<V, E, F> where
E: Unpin,
F: Unpin,
V: Unpin,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,