pub trait ServerRequestInterceptor: Interceptor {
// Provided methods
fn receive_request_service_contexts(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError> { ... }
fn receive_request(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError> { ... }
fn send_reply(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), SystemException> { ... }
fn send_exception(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError> { ... }
fn send_other(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError> { ... }
}Expand description
PortableInterceptor::ServerRequestInterceptor.
For each request, receive_request_service_contexts is called on each
interceptor in the order they were added, then receive_request on
each, the servant, and one of send_reply, send_exception or
send_other in the reverse order. They all run on the thread the
servant runs on.
Provided Methods§
Sourcefn receive_request_service_contexts(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError>
fn receive_request_service_contexts( &self, ri: &ServerRequestInfo<'_>, ) -> Result<(), InterceptError>
Before the servant is found: reads the service contexts and keeps
what it needs in the slots (ServerRequestInfo::set_slot).
Sourcefn receive_request(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError>
fn receive_request( &self, ri: &ServerRequestInfo<'_>, ) -> Result<(), InterceptError>
Just before the servant runs, on its thread.
Sourcefn send_reply(&self, ri: &ServerRequestInfo<'_>) -> Result<(), SystemException>
fn send_reply(&self, ri: &ServerRequestInfo<'_>) -> Result<(), SystemException>
Before a normal reply goes out.
Sourcefn send_exception(
&self,
ri: &ServerRequestInfo<'_>,
) -> Result<(), InterceptError>
fn send_exception( &self, ri: &ServerRequestInfo<'_>, ) -> Result<(), InterceptError>
Before an exception reply goes out.
Sourcefn send_other(&self, ri: &ServerRequestInfo<'_>) -> Result<(), InterceptError>
fn send_other(&self, ri: &ServerRequestInfo<'_>) -> Result<(), InterceptError>
Before another reply (a forward) goes out.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".