[][src]Struct actix_sled_cache::CacheBuilder

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

A builder for caches

Methods

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

pub fn new(db: Db, name: &str) -> Self[src]

Create a new builder

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

Change the frequency at which the cache is checked for expired records

pub fn subscribe(&mut self, recipient: Recipient<Deleted>) -> &mut Self[src]

Add an actor as a recipient of expiry events

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

Tell the cache not to delete records on it's own

This is likely useful if a subscribed actor needs access to the data before it is removed.

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

Create the cache from the builder

Trait Implementations

impl<V, E, F> AsMut<ExpiringTreeBuilder<V, E, F>> for CacheBuilder<V, E, F>[src]

Auto Trait Implementations

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

impl<V, E, F> !Sync for CacheBuilder<V, E, F>

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

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

impl<V, E, F> !RefUnwindSafe for CacheBuilder<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]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,