Trait opentelemetry_sdk::runtime::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>

§

type Message = T

source§

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

Implementors§