Skip to main content

LogListenerSafeLocalServerHandler

Trait LogListenerSafeLocalServerHandler 

Source
pub trait LogListenerSafeLocalServerHandler<___T = Channel>
where ___T: Transport,
{ // Required methods fn log( &mut self, request: Request<Log, ___T>, responder: Responder<Log, ___T>, ) -> impl Future<Output = ()>; fn log_many( &mut self, request: Request<LogMany, ___T>, responder: Responder<LogMany, ___T>, ) -> impl Future<Output = ()>; fn done(&mut self) -> impl Future<Output = ()>; }
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 = ()>

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 = ()>

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 = ()>

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.

Implementations on Foreign Types§

Source§

impl<___H, ___T> LogListenerSafeLocalServerHandler<___T> for Local<___H>
where ___H: LogListenerSafeServerHandler<___T>, ___T: Transport,

Source§

async fn log( &mut self, request: Request<Log, ___T>, responder: Responder<Log, ___T>, )

Source§

async fn log_many( &mut self, request: Request<LogMany, ___T>, responder: Responder<LogMany, ___T>, )

Source§

async fn done(&mut self)

Implementors§