pub struct AppState {
pub client: CrateClient,
pub config: AppConfig,
pub metrics: Arc<ServerMetrics>,
pub cache: Arc<DashMap<String, CacheEntry>>,
pub start_time: Instant,
}Expand description
Server state shared across handlers
Fields§
§client: CrateClient§config: AppConfig§metrics: Arc<ServerMetrics>§cache: Arc<DashMap<String, CacheEntry>>§start_time: InstantTrait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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