Struct overclock::core::AbortableBoundedHandle
source · pub struct AbortableBoundedHandle<T> { /* private fields */ }
Expand description
Abortable bounded handle
Implementations§
source§impl<T> AbortableBoundedHandle<T>
impl<T> AbortableBoundedHandle<T>
sourcepub fn new(sender: BoundedHandle<T>) -> Self
pub fn new(sender: BoundedHandle<T>) -> Self
Crete new abortable bounded handle
sourcepub fn send_after(
&self,
message: T,
duration: Duration
) -> JoinHandle<Result<(), SendError<T>>>where
T: Send + 'static,
pub fn send_after(
&self,
message: T,
duration: Duration
) -> JoinHandle<Result<(), SendError<T>>>where
T: Send + 'static,
Send message to the channel after the duration pass
sourcepub fn try_send(&self, message: T) -> Result<(), TrySendError<T>>
pub fn try_send(&self, message: T) -> Result<(), TrySendError<T>>
Attempts to send message to the channel
sourcepub fn same_channel(&self, other: &Self) -> bool
pub fn same_channel(&self, other: &Self) -> bool
Returns true if the handle belongs to same channel