[−][src]Struct actix_sled_cache::CacheBuilder
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]
E: Encoding<HashSet<IVec>> + Encoding<DateTime<Utc>> + 'static,
F: Encoding<V> + 'static,
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]
fn as_mut(&mut self) -> &mut TreeBuilder<V, E, F>
[src]
Auto Trait Implementations
impl<V, E, F> Send for CacheBuilder<V, E, F> where
E: Send,
F: Send,
V: Send,
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,
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]
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,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,