Struct bonsaidb_server::CustomServer[][src]

pub struct CustomServer<B: Backend = NoBackend> { /* fields omitted */ }
Expand description

A BonsaiDb server.

Implementations

Listens for HTTP traffic on port. This port will also receive WebSocket connections if feature websockets is enabled.

Listens for HTTPS traffic on port. This port will also receive WebSocket connections if feature websockets is enabled. If feature acme is enabled, this connection will automatically manage the server’s private key and certificate, which is also used for the QUIC-based protocol.

Listens for websocket connections on addr.

Handles upgrading an HTTP connection to the WebSocket protocol based on the upgrade request. Requires feature hyper to be enabled.

Handles an established tokio-tungstenite WebSocket stream.

Opens a server using directory for storage.

Returns the path to the public pinned certificate, if this server has one. Note: this function will always succeed, but the file may not exist.

Returns the primary domain configured for this server.

Returns the administration database.

Installs an X.509 certificate used for general purpose connections.

Installs a certificate chain and private key used for TLS connections.

Installs a certificate chain and private key used for TLS connections.

Returns the current certificate chain.

Listens for incoming client connections. Does not return until the server shuts down.

Returns all of the currently connected clients.

Sends a custom API response to all connected clients.

Shuts the server down. If a timeout is provided, the server will stop accepting new connections and attempt to respond to any outstanding requests already being processed. After the timeout has elapsed or if no timeout was provided, the server is forcefully shut down.

Listens for signals from the operating system that the server should shut down and attempts to gracefully shut down.

Methods from Deref<Target = AsyncStorage>

Restores all data from a previously stored backup location.

Stores a copy of all data in this instance to location.

Restricts an unauthenticated instance to having effective_permissions. Returns None if a session has already been established.

Converts this instance into its blocking version, which is able to be used without async.

Returns a reference to this instance’s blocking version, which is able to be used without async.

Trait Implementations

The error type returned from the functions on this trait.

Returns the previously written data for contacts, if any. This function should return None instead of erroring if data was not previously written for contacts. Read more

Writes data for contacts. The data being written is unique for the combined list of contacts. Read more

Writes a certificate retrieved from Acme. The parameters are: Read more

The type that represents a database for this implementation.

The StorageConnection type returned from authentication calls.

Returns the currently authenticated session, if any.

Creates a database named name using the SchemaName schema. Read more

Returns a reference to database name with schema DB.

Deletes a database named name. Read more

Lists the databases in this storage.

Lists the SchemaNames registered with this storage.

Creates a user.

Deletes a user.

Sets a user’s password.

Authenticates as a user with a authentication method.

Assumes the identity. If successful, the returned instance will have the merged permissions of the current authentication session and the permissions from identity. Read more

Adds a user to a permission group.

Removes a user from a permission group.

Adds a user to a permission group.

Removes a user from a permission group.

Creates a database named name with the Schema provided. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Performs the conversion.

Performs the conversion.

Returns the currently authenticated session, if any.

Checks if action is permitted against resource_name.

Checks if action is permitted against resource_name. If permission is denied, returns a PermissionDenied error. Read more

Choose a certificate chain and matching key given simplified ClientHello information. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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