Trait rerun::sdk::sink::LogSink

source ·
pub trait LogSink: Send + Sync + 'static {
    // Required methods
    fn send(&self, msg: LogMsg);
    fn flush_blocking(&self);

    // Provided methods
    fn send_all(&self, messages: Vec<LogMsg>) { ... }
    fn drain_backlog(&self) -> Vec<LogMsg> { ... }
    fn drop_if_disconnected(&self) { ... }
    fn send_blueprint(
        &self,
        blueprint: Vec<LogMsg>,
        activation_cmd: BlueprintActivationCommand
    ) { ... }
}
Expand description

Where the SDK sends its log messages.

Required Methods§

source

fn send(&self, msg: LogMsg)

Send this log message.

source

fn flush_blocking(&self)

Blocks until all pending data in the sink’s send buffers has been fully flushed.

See also LogSink::drop_if_disconnected.

Provided Methods§

source

fn send_all(&self, messages: Vec<LogMsg>)

Send all these log messages.

source

fn drain_backlog(&self) -> Vec<LogMsg>

Drain all buffered LogMsges and return them.

Only applies to sinks that maintain a backlog.

source

fn drop_if_disconnected(&self)

Drops all pending data currently sitting in the sink’s send buffers if it is unable to flush it for any reason (e.g. a broken TCP connection for a TcpSink).

source

fn send_blueprint( &self, blueprint: Vec<LogMsg>, activation_cmd: BlueprintActivationCommand )

Send a blueprint directly to the log-sink.

This mirrors the behavior of crate::RecordingStream::send_blueprint.

Implementors§