Skip to main content

LogListenerSafeServerHandler

Trait LogListenerSafeServerHandler 

Source
pub trait LogListenerSafeServerHandler<___T = Channel>
where ___T: Transport,
{ // Required methods fn log( &mut self, request: Request<Log, ___T>, responder: Responder<Log, ___T>, ) -> impl Future<Output = ()> + Send; fn log_many( &mut self, request: Request<LogMany, ___T>, responder: Responder<LogMany, ___T>, ) -> impl Future<Output = ()> + Send; fn done(&mut self) -> impl Future<Output = ()> + Send; }
Expand description

A server handler for the LogListenerSafe protocol.

See LogListenerSafe for more details.

Required Methods§

Source

fn log( &mut self, request: Request<Log, ___T>, responder: Responder<Log, ___T>, ) -> impl Future<Output = ()> + Send

Called for single messages.

The return value is used for flow control, and implementers should acknowledge receipt of each message in order to continue receiving future messages.

Source

fn log_many( &mut self, request: Request<LogMany, ___T>, responder: Responder<LogMany, ___T>, ) -> impl Future<Output = ()> + Send

Called when serving cached logs.

Max logs size per call is MAX_LOG_MANY_SIZE_BYTES bytes.

The return value is used for flow control, and implementers should acknowledge receipt of each batch in order to continue receiving future messages.

Source

fn done(&mut self) -> impl Future<Output = ()> + Send

Called when this listener was passed to DumpLogsSafe() and all cached logs have been sent.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§