Trait sentry_core::Transport

source ·
pub trait Transport: Send + Sync + 'static {
    // Required method
    fn send_envelope(&self, envelope: Envelope);

    // Provided methods
    fn flush(&self, timeout: Duration) -> bool { ... }
    fn shutdown(&self, timeout: Duration) -> bool { ... }
}
Expand description

The trait for transports.

A transport is responsible for sending events to Sentry. Custom implementations can be created to use a different abstraction to send events. This is for instance used for the test system.

Required Methods§

source

fn send_envelope(&self, envelope: Envelope)

Sends an Envelope.

Provided Methods§

source

fn flush(&self, timeout: Duration) -> bool

Flushes the transport queue if there is one.

If the queue was successfully drained, the return value should be true or false if events were left in it.

source

fn shutdown(&self, timeout: Duration) -> bool

Instructs the Transport to shut down.

Implementations on Foreign Types§

source§

impl<T: Transport> Transport for Arc<T>

source§

fn send_envelope(&self, envelope: Envelope)

source§

fn shutdown(&self, timeout: Duration) -> bool

Implementors§