pub struct ServerState {
pub cache: Box<dyn CacheBackend>,
pub current_index: usize,
}
Expand description
State for the server
Fields§
§cache: Box<dyn CacheBackend>
Cache backend for storing images
current_index: usize
What is the current index (for sequential image serving)
Implementations§
Source§impl ServerState
impl ServerState
Sourcepub fn with_config(config: &Config) -> Self
pub fn with_config(config: &Config) -> Self
Create a new ServerState
with a specific configuration
Trait Implementations§
Source§impl Debug for ServerState
impl Debug for ServerState
Auto Trait Implementations§
impl Freeze for ServerState
impl !RefUnwindSafe for ServerState
impl Send for ServerState
impl Sync for ServerState
impl Unpin for ServerState
impl !UnwindSafe for ServerState
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