Struct bonsaidb::server::ServerConfiguration [−][src]
#[non_exhaustive]pub struct ServerConfiguration<B = NoBackend> where
B: Backend, {
pub server_name: String,
pub client_simultaneous_request_limit: usize,
pub request_workers: usize,
pub storage: StorageConfiguration,
pub default_permissions: DefaultPermissions,
pub acme: AcmeConfiguration,
// some fields omitted
}
Expand description
Configuration options for Server
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.server_name: String
The DNS name of the server.
client_simultaneous_request_limit: usize
Number of sumultaneous requests a single client can have in flight at a
time. Default value is 16. It is important to have this number be tuned
relative to request_workers
such that one client cannot overwhelm the
entire queue.
request_workers: usize
Number of simultaneous requests to be processed. Default value is 16.
storage: StorageConfiguration
Configuration options for individual databases.
default_permissions: DefaultPermissions
The permissions granted to all connections to this server.
acme: AcmeConfiguration
The ACME settings for automatic TLS certificate management.
Implementations
Sets Self::server_name
to server_name
and returns self.
pub fn client_simultaneous_request_limit(
self,
request_limit: usize
) -> ServerConfiguration<B>
pub fn client_simultaneous_request_limit(
self,
request_limit: usize
) -> ServerConfiguration<B>
Sets Self::client_simultaneous_request_limit
to request_limit
and returns self.
Sets Self::request_workers
to workers
and returns self.
pub fn default_permissions<P>(
self,
default_permissions: P
) -> ServerConfiguration<B> where
P: Into<DefaultPermissions>,
pub fn default_permissions<P>(
self,
default_permissions: P
) -> ServerConfiguration<B> where
P: Into<DefaultPermissions>,
Sets Self::default_permissions
to default_permissions
and returns self.
Sets AcmeConfiguration::contact_email
to contact_email
and returns self.
Sets AcmeConfiguration::directory
to directory
and returns self.
Trait Implementations
Registers the schema and returns self.
Sets StorageConfiguration::path
to true and returns self.
Sets StorageConfiguration::path
to path
and returns self.
Sets StorageConfiguration::unique_id
to unique_id
and returns self.
pub fn vault_key_storage<VaultKeyStorage>(
self,
key_storage: VaultKeyStorage
) -> ServerConfiguration<B> where
VaultKeyStorage: AnyVaultKeyStorage,
pub fn vault_key_storage<VaultKeyStorage>(
self,
key_storage: VaultKeyStorage
) -> ServerConfiguration<B> where
VaultKeyStorage: AnyVaultKeyStorage,
Sets StorageConfiguration::vault_key_storage
to key_storage
and returns self.
Sets StorageConfiguration::default_encryption_key
to path
and returns self.
Sets Tasks::worker_count
to worker_count
and returns self.
Sets Tasks::parallelization
to parallelization
and returns self.
Sets Views::check_integrity_on_open
to check
and returns self.
Sets StorageConfiguration::default_compression
to path
and returns self.
pub fn key_value_persistence(
self,
persistence: KeyValuePersistence
) -> ServerConfiguration<B>
pub fn key_value_persistence(
self,
persistence: KeyValuePersistence
) -> ServerConfiguration<B>
Sets StorageConfiguration::key_value_persistence
to persistence
and returns self.
pub fn authenticated_permissions<P>(
self,
authenticated_permissions: P
) -> ServerConfiguration<B> where
P: Into<Permissions>,
pub fn authenticated_permissions<P>(
self,
authenticated_permissions: P
) -> ServerConfiguration<B> where
P: Into<Permissions>,
Sets Self::authenticated_permissions
to authenticated_permissions
and returns self.
Sets StorageConfiguration::argon
to argon
and returns self.
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<B = NoBackend> !RefUnwindSafe for ServerConfiguration<B>
impl<B> Send for ServerConfiguration<B>
impl<B> Sync for ServerConfiguration<B>
impl<B> Unpin for ServerConfiguration<B>
impl<B = NoBackend> !UnwindSafe for ServerConfiguration<B>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more