Skip to main content

ServerRequestInterceptor

Trait ServerRequestInterceptor 

Source
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§

Source

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).

Source

fn receive_request( &self, ri: &ServerRequestInfo<'_>, ) -> Result<(), InterceptError>

Just before the servant runs, on its thread.

Source

fn send_reply(&self, ri: &ServerRequestInfo<'_>) -> Result<(), SystemException>

Before a normal reply goes out.

Source

fn send_exception( &self, ri: &ServerRequestInfo<'_>, ) -> Result<(), InterceptError>

Before an exception reply goes out.

Source

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".

Implementors§