Trait tarantool::fiber::channel::SendTimeout
source · pub trait SendTimeout<T> {
// Required method
fn send_maybe_timeout(
&self,
t: T,
timeout: Option<Duration>
) -> Result<(), SendError<T>>
where T: 'static;
// Provided methods
fn send(&self, t: T) -> Result<(), T>
where T: 'static { ... }
fn send_timeout(&self, t: T, timeout: Duration) -> Result<(), SendError<T>>
where T: 'static { ... }
fn try_send(&self, t: T) -> Result<(), TrySendError<T>>
where T: 'static { ... }
}
Required Methods§
sourcefn send_maybe_timeout(
&self,
t: T,
timeout: Option<Duration>
) -> Result<(), SendError<T>>where
T: 'static,
fn send_maybe_timeout(
&self,
t: T,
timeout: Option<Duration>
) -> Result<(), SendError<T>>where
T: 'static,
Send a message t
over the channel.
In case the channel was closed or the current fiber was cancelled the
function returns SendError<T>
which contains the original message, so
that the caller has an option to reuse the value.
This function may perform a yield in case the channel buffer is full and there are no readers ready to receive the message.