pub struct RedDBGrpcServer { /* private fields */ }Implementations§
Source§impl RedDBGrpcServer
impl RedDBGrpcServer
pub fn new(runtime: RedDBRuntime) -> Self
pub fn from_database_options( db_options: RedDBOptions, options: GrpcServerOptions, ) -> RedDBResult<Self>
pub fn with_options( runtime: RedDBRuntime, options: GrpcServerOptions, auth_store: Arc<AuthStore>, ) -> Self
Sourcepub fn with_oauth_validator(self, validator: Arc<OAuthValidator>) -> Self
pub fn with_oauth_validator(self, validator: Arc<OAuthValidator>) -> Self
Attach an externally-constructed OAuth/OIDC JWT validator. Once
set, JWT-shaped bearer tokens (3-segment) on the
authorization metadata are validated against the issuer’s
JWKS, expiry, audience, etc. Non-JWT bearers fall back to the
AuthStore session/API-key path.
Sourcepub fn oauth_validator(&self) -> Option<&Arc<OAuthValidator>>
pub fn oauth_validator(&self) -> Option<&Arc<OAuthValidator>>
Inspect the active OAuth validator, when one is configured.
pub fn runtime(&self) -> &RedDBRuntime
pub fn options(&self) -> &GrpcServerOptions
pub fn auth_store(&self) -> &Arc<AuthStore> ⓘ
pub async fn serve(&self) -> Result<(), Box<dyn Error>>
pub async fn serve_on( &self, listener: TcpListener, ) -> Result<(), Box<dyn Error>>
Trait Implementations§
Source§impl Clone for RedDBGrpcServer
impl Clone for RedDBGrpcServer
Source§fn clone(&self) -> RedDBGrpcServer
fn clone(&self) -> RedDBGrpcServer
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 RedDBGrpcServer
impl !RefUnwindSafe for RedDBGrpcServer
impl Send for RedDBGrpcServer
impl Sync for RedDBGrpcServer
impl Unpin for RedDBGrpcServer
impl UnsafeUnpin for RedDBGrpcServer
impl !UnwindSafe for RedDBGrpcServer
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