pub struct RedDBServer { /* private fields */ }Implementations§
Source§impl RedDBServer
impl RedDBServer
pub fn new(runtime: RedDBRuntime) -> Self
pub fn from_database_options( db_options: RedDBOptions, server_options: ServerOptions, ) -> RedDBResult<Self>
pub fn with_options(runtime: RedDBRuntime, options: ServerOptions) -> Self
Sourcepub fn with_auth(self, auth_store: Arc<AuthStore>) -> Self
pub fn with_auth(self, auth_store: Arc<AuthStore>) -> Self
Attach an AuthStore for HTTP-layer authentication.
Also injects the store into the runtime so that Value::Secret
auto-encrypt/decrypt can reach the vault AES key.
Sourcepub fn with_replication(self, state: Arc<ServerReplicationState>) -> Self
pub fn with_replication(self, state: Arc<ServerReplicationState>) -> Self
Attach replication state for status and snapshot endpoints.
pub fn runtime(&self) -> &RedDBRuntime
pub fn options(&self) -> &ServerOptions
pub fn serve(&self) -> Result<()>
pub fn serve_on(&self, listener: TcpListener) -> Result<()>
pub fn serve_in_background(&self) -> JoinHandle<Result<()>>
pub fn serve_in_background_on( &self, listener: TcpListener, ) -> JoinHandle<Result<()>>
Sourcepub fn serve_tls(&self, tls_config: Arc<ServerConfig>) -> Result<()>
pub fn serve_tls(&self, tls_config: Arc<ServerConfig>) -> Result<()>
Serve TLS-wrapped HTTPS on the configured bind_addr. The
tls_config is shared across all connections (rustls
ServerConfig is Send + Sync).
pub fn serve_tls_on( &self, listener: TcpListener, tls_config: Arc<ServerConfig>, ) -> Result<()>
pub fn serve_tls_in_background( &self, tls_config: Arc<ServerConfig>, ) -> JoinHandle<Result<()>>
pub fn serve_tls_in_background_on( &self, listener: TcpListener, tls_config: Arc<ServerConfig>, ) -> JoinHandle<Result<()>>
Trait Implementations§
Source§impl Clone for RedDBServer
impl Clone for RedDBServer
Source§fn clone(&self) -> RedDBServer
fn clone(&self) -> RedDBServer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RedDBServer
impl !RefUnwindSafe for RedDBServer
impl Send for RedDBServer
impl Sync for RedDBServer
impl Unpin for RedDBServer
impl UnsafeUnpin for RedDBServer
impl !UnwindSafe for RedDBServer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request