[−][src]Struct actix_storage::dev::StorageBuilder
Builder struct for Storage
A provider can either implement ExpiryStore directly,
or implement Store and rely on another provider to provide
expiration capablities. The builder will polyfill a ExpiryStore
by combining an Expiry and a Store itself.
If there is no Expiry set in either of the ways, it will result in runtime
errors when calling methods which require that functionality.
Implementations
impl StorageBuilder[src]
#[must_use = "Builder must be used by calling finish"]pub fn store(self, store: impl Store + 'static) -> Self[src]
This method can be used to set a Store, the second call to this
method will overwrite the store.
#[must_use = "Builder must be used by calling finish"]pub fn expiry(self, expiry: impl Expiry + 'static) -> Self[src]
This method can be used to set a Expiry, the second call to this
method will overwrite the expiry.
The expiry should work on the same storage as the provided store.
#[must_use = "Builder must be used by calling finish"]pub fn expiry_store<T>(self, expiry_store: T) -> Self where
T: 'static + Store + Expiry + ExpiryStore, [src]
T: 'static + Store + Expiry + ExpiryStore,
This method can be used to set an ExpiryStore directly,
Its error to call expiry or store after calling this method.
#[must_use = "Builder must be used by calling finish"]pub fn format(self, format: Format) -> Self[src]
This method can be used to set the format storage will use for serialization/deserialization, we will use default format if it is not called which can be None if there is no serde feature enabled.
pub fn finish(self) -> Storage[src]
This method should be used after configuring the storage.
Panics
If there is no store provided either by calling expiry_store
or store it will panic.
Trait Implementations
impl Default for StorageBuilder[src]
fn default() -> StorageBuilder[src]
Auto Trait Implementations
impl !RefUnwindSafe for StorageBuilder
impl Send for StorageBuilder
impl Sync for StorageBuilder
impl Unpin for StorageBuilder
impl !UnwindSafe for StorageBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,