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§
Auto Trait Implementations§
impl !RefUnwindSafe for RedDBGrpcServer
impl !UnwindSafe for RedDBGrpcServer
impl Forget for RedDBGrpcServer
impl Freeze for RedDBGrpcServerwhere
*const ArcInner<RuntimeBackgroundTasks> is !null: Freeze,
PhantomData<ArcInner<RuntimeBackgroundTasks>>: Freeze,
*const ArcInner<RuntimeInner> is !null: Freeze,
PhantomData<ArcInner<RuntimeInner>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<AuthStore> is !null: Freeze,
PhantomData<ArcInner<AuthStore>>: Freeze,
*const ArcInner<PreparedRegistry> is !null: Freeze,
PhantomData<ArcInner<PreparedRegistry>>: Freeze,
*const ArcInner<OAuthValidator> is !null: Freeze,
PhantomData<ArcInner<OAuthValidator>>: Freeze,
impl Move for RedDBGrpcServer
impl Send for RedDBGrpcServer
impl Sync for RedDBGrpcServer
impl Unpin for RedDBGrpcServer
impl UnsafeUnpin for RedDBGrpcServerwhere
*const ArcInner<RuntimeBackgroundTasks> is !null: UnsafeUnpin,
PhantomData<ArcInner<RuntimeBackgroundTasks>>: UnsafeUnpin,
*const ArcInner<RuntimeInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<RuntimeInner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<AuthStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<AuthStore>>: UnsafeUnpin,
*const ArcInner<PreparedRegistry> is !null: UnsafeUnpin,
PhantomData<ArcInner<PreparedRegistry>>: UnsafeUnpin,
*const ArcInner<OAuthValidator> is !null: UnsafeUnpin,
PhantomData<ArcInner<OAuthValidator>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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