pub struct MiddlewareState<S> {
pub id_generator: RequestIdGenerator,
pub config: Arc<Mutex<MiddlewareConfig>>,
pub server_state: Arc<Mutex<S>>,
}Expand description
Shared state for the request middleware, held in an Arc for cloning.
Fields§
§id_generator: RequestIdGenerator§config: Arc<Mutex<MiddlewareConfig>>§server_state: Arc<Mutex<S>>Auto Trait Implementations§
impl<S> !Freeze for MiddlewareState<S>
impl<S> RefUnwindSafe for MiddlewareState<S>
impl<S> Send for MiddlewareState<S>where
S: Send,
impl<S> Sync for MiddlewareState<S>where
S: Send,
impl<S> Unpin for MiddlewareState<S>
impl<S> UnsafeUnpin for MiddlewareState<S>
impl<S> UnwindSafe for MiddlewareState<S>
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 moreCreates a shared type from an unshared type.