Struct apalis::prelude::MemoryStorage
source · pub struct MemoryStorage<T> { /* private fields */ }
Expand description
An example of the basics of a backend
Implementations§
source§impl<T> MemoryStorage<T>
impl<T> MemoryStorage<T>
sourcepub fn new() -> MemoryStorage<T>
pub fn new() -> MemoryStorage<T>
Create a new in-memory storage
Trait Implementations§
source§impl<T> Backend<Request<T>> for MemoryStorage<T>
impl<T> Backend<Request<T>> for MemoryStorage<T>
§type Stream = BackendStream<Pin<Box<dyn Stream<Item = Result<Option<Request<T>>, Error>> + Send>>>
type Stream = BackendStream<Pin<Box<dyn Stream<Item = Result<Option<Request<T>>, Error>> + Send>>>
The stream to be produced by the backend
§type Layer = ServiceBuilder<Identity>
type Layer = ServiceBuilder<Identity>
Returns the final decoration of layers
source§fn common_layer(
&self,
_worker: WorkerId
) -> <MemoryStorage<T> as Backend<Request<T>>>::Layer
fn common_layer( &self, _worker: WorkerId ) -> <MemoryStorage<T> as Backend<Request<T>>>::Layer
Allows the backend to decorate the service with Layer
source§impl<T> Clone for MemoryStorage<T>
impl<T> Clone for MemoryStorage<T>
source§fn clone(&self) -> MemoryStorage<T>
fn clone(&self) -> MemoryStorage<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Debug for MemoryStorage<T>where
T: Debug,
impl<T> Debug for MemoryStorage<T>where
T: Debug,
source§impl<T> Default for MemoryStorage<T>
impl<T> Default for MemoryStorage<T>
source§fn default() -> MemoryStorage<T>
fn default() -> MemoryStorage<T>
Returns the “default value” for a type. Read more
source§impl<Message> MessageQueue<Message> for MemoryStorage<Message>
impl<Message> MessageQueue<Message> for MemoryStorage<Message>
Auto Trait Implementations§
impl<T> Freeze for MemoryStorage<T>
impl<T> !RefUnwindSafe for MemoryStorage<T>
impl<T> Send for MemoryStorage<T>where
T: Send,
impl<T> Sync for MemoryStorage<T>where
T: Send,
impl<T> Unpin for MemoryStorage<T>
impl<T> !UnwindSafe for MemoryStorage<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more