pub struct AppState<S: StateStore> {
pub store: Arc<S>,
pub translator: Arc<dyn Translator>,
pub start_time: Instant,
}Expand description
Application state shared across handlers.
Fields§
§store: Arc<S>The state store backend.
translator: Arc<dyn Translator>The translator for converting state to context.
start_time: InstantServer start time for uptime calculation.
Implementations§
Auto Trait Implementations§
impl<S> Freeze for AppState<S>
impl<S> !RefUnwindSafe for AppState<S>
impl<S> Send for AppState<S>
impl<S> Sync for AppState<S>
impl<S> Unpin for AppState<S>
impl<S> !UnwindSafe for AppState<S>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more