pub struct ServerState {
pub storage: Arc<dyn StorageBackend>,
pub verifier: Arc<dyn TokenVerifier>,
pub validator: Arc<dyn Validator>,
pub compression: CompressionFormat,
pub max_upload_size: u64,
}Expand description
Immutable server configuration shared by all handlers.
Fields§
§storage: Arc<dyn StorageBackend>The storage backend serving file content.
verifier: Arc<dyn TokenVerifier>Turns bearer tokens into claims.
validator: Arc<dyn Validator>Decides whether claims may access a path.
compression: CompressionFormatCompression applied to downloads when the client asks for it.
max_upload_size: u64Upper bound for a single upload body.
Implementations§
Source§impl ServerState
impl ServerState
Sourcepub fn builder() -> ServerStateBuilder
pub fn builder() -> ServerStateBuilder
Start building a server state.
Check whether claims may perform action on path.
Auto Trait Implementations§
impl !RefUnwindSafe for ServerState
impl !UnwindSafe for ServerState
impl Freeze for ServerState
impl Send for ServerState
impl Sync for ServerState
impl Unpin for ServerState
impl UnsafeUnpin 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