pub struct IdentityIntermediaryMiddleware;Expand description
Identity forwarding-boundary middleware.
Trait Implementations§
Source§impl Clone for IdentityIntermediaryMiddleware
impl Clone for IdentityIntermediaryMiddleware
Source§fn clone(&self) -> IdentityIntermediaryMiddleware
fn clone(&self) -> IdentityIntermediaryMiddleware
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 moreimpl Copy for IdentityIntermediaryMiddleware
Source§impl Default for IdentityIntermediaryMiddleware
impl Default for IdentityIntermediaryMiddleware
Source§fn default() -> IdentityIntermediaryMiddleware
fn default() -> IdentityIntermediaryMiddleware
Returns the “default value” for a type. Read more
impl Eq for IdentityIntermediaryMiddleware
Source§impl<State, ServerContext, ClientContext> IntermediaryMiddleware<State, ServerContext, ClientContext> for IdentityIntermediaryMiddleware
impl<State, ServerContext, ClientContext> IntermediaryMiddleware<State, ServerContext, ClientContext> for IdentityIntermediaryMiddleware
Source§type Error = Infallible
type Error = Infallible
Application-defined interception failure.
Source§async fn frontend(
&mut self,
_server: &ServerContext,
_client: &ClientContext,
_state: &mut State,
message: FrontendMessage,
) -> Result<FrontendMiddlewareOutput, Self::Error>
async fn frontend( &mut self, _server: &ServerContext, _client: &ClientContext, _state: &mut State, message: FrontendMessage, ) -> Result<FrontendMiddlewareOutput, Self::Error>
Intercepts a client-originated message after server-role middleware and
before client-role middleware.
Source§async fn frontend_operation(
&mut self,
server: &ServerContext,
client: &ClientContext,
state: &mut State,
_operation: OperationId,
message: FrontendMessage,
) -> Result<FrontendMiddlewareOutput, Self::Error>
async fn frontend_operation( &mut self, server: &ServerContext, client: &ClientContext, state: &mut State, _operation: OperationId, message: FrontendMessage, ) -> Result<FrontendMiddlewareOutput, Self::Error>
Intercepts a client-originated message with the identity reserved for
the operation if it is forwarded or handled locally. Read more
Source§async fn backend(
&mut self,
_server: &ServerContext,
_client: &ClientContext,
_state: &mut State,
message: BackendMessage,
) -> Result<BackendMiddlewareOutput, Self::Error>
async fn backend( &mut self, _server: &ServerContext, _client: &ClientContext, _state: &mut State, message: BackendMessage, ) -> Result<BackendMiddlewareOutput, Self::Error>
Intercepts a PostgreSQL-originated message after client-role middleware
and before server-role middleware.
Source§async fn backend_operation(
&mut self,
server: &ServerContext,
client: &ClientContext,
state: &mut State,
_operation: Option<OperationId>,
message: BackendMessage,
) -> Result<BackendMiddlewareOutput, Self::Error>
async fn backend_operation( &mut self, server: &ServerContext, client: &ClientContext, state: &mut State, _operation: Option<OperationId>, message: BackendMessage, ) -> Result<BackendMiddlewareOutput, Self::Error>
Intercepts a PostgreSQL-originated message with its frontend operation
identity when the message advances an operation. Read more
Source§async fn flush_backend(
&mut self,
_server: &ServerContext,
_client: &ClientContext,
_state: &mut State,
held: HeldBackendMessages<'_>,
_reason: BackendFlushReason,
) -> Result<BackendBatchOutput, Self::Error>
async fn flush_backend( &mut self, _server: &ServerContext, _client: &ClientContext, _state: &mut State, held: HeldBackendMessages<'_>, _reason: BackendFlushReason, ) -> Result<BackendBatchOutput, Self::Error>
Applies policy to an ordered borrowed span of retained backend messages.
Source§async fn flush_backend_operations(
&mut self,
server: &ServerContext,
client: &ClientContext,
state: &mut State,
held: AttributedBackendMessages<'_>,
reason: BackendFlushReason,
) -> Result<BackendBatchOutput, Self::Error>
async fn flush_backend_operations( &mut self, server: &ServerContext, client: &ClientContext, state: &mut State, held: AttributedBackendMessages<'_>, reason: BackendFlushReason, ) -> Result<BackendBatchOutput, Self::Error>
Applies policy to retained backend messages with operation attribution.
The default preserves existing middleware by delegating to
Self::flush_backend.Source§impl<ServerContext, ClientContext> IntermediaryMiddlewareFactory<ServerContext, ClientContext> for IdentityIntermediaryMiddleware
impl<ServerContext, ClientContext> IntermediaryMiddlewareFactory<ServerContext, ClientContext> for IdentityIntermediaryMiddleware
Source§type Handler = IdentityIntermediaryMiddleware
type Handler = IdentityIntermediaryMiddleware
Per-connection boundary handler.
Source§fn create(&self, _server: &ServerContext, _client: &ClientContext) -> Self
fn create(&self, _server: &ServerContext, _client: &ClientContext) -> Self
Creates an isolated handler from both distinct role contexts.
impl StructuralPartialEq for IdentityIntermediaryMiddleware
Auto Trait Implementations§
impl Freeze for IdentityIntermediaryMiddleware
impl RefUnwindSafe for IdentityIntermediaryMiddleware
impl Send for IdentityIntermediaryMiddleware
impl Sync for IdentityIntermediaryMiddleware
impl Unpin for IdentityIntermediaryMiddleware
impl UnsafeUnpin for IdentityIntermediaryMiddleware
impl UnwindSafe for IdentityIntermediaryMiddleware
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