Transport

Trait Transport 

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

    // Provided method
    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 shutdown(&self, timeout: Duration) -> bool

Drains the queue if there is one.

The default implementation does nothing. If the queue was successfully shutdowned the return value should be true or false if events were left in it.

Implementations on Foreign Types§

Source§

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

Source§

fn send_envelope(&self, envelope: Envelope)

Source§

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

Implementors§