pub struct ServerStateBuilder { /* private fields */ }Expand description
Builder for ServerState.
Implementations§
Source§impl ServerStateBuilder
impl ServerStateBuilder
Sourcepub fn storage(self, storage: impl StorageBackend) -> Self
pub fn storage(self, storage: impl StorageBackend) -> Self
Required: the storage backend.
Sourcepub fn verifier(self, verifier: impl TokenVerifier) -> Self
pub fn verifier(self, verifier: impl TokenVerifier) -> Self
Required: the token verifier.
Sourcepub fn validator(self, validator: impl Validator) -> Self
pub fn validator(self, validator: impl Validator) -> Self
Required: the path/permission validator.
Sourcepub fn compression(self, format: CompressionFormat) -> Self
pub fn compression(self, format: CompressionFormat) -> Self
Compression for downloads (default: Zrip).
Sourcepub fn max_upload_size(self, size: u64) -> Self
pub fn max_upload_size(self, size: u64) -> Self
Maximum upload size in bytes (default: 100 GiB).
Sourcepub fn build(self) -> ServerState
pub fn build(self) -> ServerState
Build the state, panicking if required fields are missing.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerStateBuilder
impl !UnwindSafe for ServerStateBuilder
impl Freeze for ServerStateBuilder
impl Send for ServerStateBuilder
impl Sync for ServerStateBuilder
impl Unpin for ServerStateBuilder
impl UnsafeUnpin for ServerStateBuilder
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