pub struct AppState {
pub host: String,
pub port: u16,
pub printers: PrinterRegistry,
pub print_job: PrintJobFn,
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§state_path: PathBuf§jobs: JobRegistry§device_backend: Arc<dyn DeviceBackend>Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe 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