opentelemetry_sdk::runtime

Trait TrySend

Source
pub trait TrySend: Sync + Send {
    type Message;

    // Required method
    fn try_send(&self, item: Self::Message) -> Result<(), TrySendError>;
}
Expand description

TrySend is an abstraction of Sender that is capable of sending messages through a reference.

Required Associated Types§

Source

type Message

The message that will be sent.

Required Methods§

Source

fn try_send(&self, item: Self::Message) -> Result<(), TrySendError>

Try to send a message batch to a worker thread.

A failure can be due to either a closed receiver, or a depleted buffer.

Implementations on Foreign Types§

Source§

impl<T: Send> TrySend for Sender<T>

Source§

type Message = T

Source§

fn try_send(&self, item: Self::Message) -> Result<(), TrySendError>

Implementors§