pub struct AppState {
pub host: String,
pub port: u16,
pub printers: PrinterRegistry,
pub print_job: PrintJobFn,
pub media_change: Option<MediaChangeFn>,
pub state_path: PathBuf,
pub jobs: JobRegistry,
pub device_backend: Arc<dyn DeviceBackend>,
}Expand description
Axum-shared state. Constructed internally by Server::router; exposed
only so external middleware can read the printer registry.
Fields§
§host: String§port: u16§printers: PrinterRegistry§print_job: PrintJobFn§media_change: Option<MediaChangeFn>§state_path: PathBuf§jobs: JobRegistry§device_backend: Arc<dyn DeviceBackend>Trait 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