Struct overclock::core::BoundedHandle
source · [−]pub struct BoundedHandle<T> { /* private fields */ }
Expand description
Bounded handle
Implementations
sourceimpl<T> BoundedHandle<T>
impl<T> BoundedHandle<T>
sourcepub fn new(
sender: Sender<T>,
gauge: IntGauge,
abort_handle: AbortHandle,
scope_id: ScopeId
) -> Self
pub fn new(
sender: Sender<T>,
gauge: IntGauge,
abort_handle: AbortHandle,
scope_id: ScopeId
) -> Self
Create new bounded handle
sourcepub async fn send(&self, message: T) -> Result<(), SendError<T>>
pub async fn send(&self, message: T) -> Result<(), SendError<T>>
Send message to the bounded channel
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>>
Attempt to send message to the bounded 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
Trait Implementations
sourceimpl<T> Clone for BoundedHandle<T>
impl<T> Clone for BoundedHandle<T>
sourceimpl<T: Debug> Debug for BoundedHandle<T>
impl<T: Debug> Debug for BoundedHandle<T>
sourceimpl<M: 'static + Send, E: Send> Route<M> for BoundedHandle<E> where
E: TryFrom<M>,
E::Error: Send,
impl<M: 'static + Send, E: Send> Route<M> for BoundedHandle<E> where
E: TryFrom<M>,
E::Error: Send,
sourceimpl<E: 'static + ShutdownEvent> Shutdown for BoundedHandle<E>
impl<E: 'static + ShutdownEvent> Shutdown for BoundedHandle<E>
Auto Trait Implementations
impl<T> !RefUnwindSafe for BoundedHandle<T>
impl<T> Send for BoundedHandle<T> where
T: Send,
impl<T> Sync for BoundedHandle<T> where
T: Send,
impl<T> Unpin for BoundedHandle<T>
impl<T> !UnwindSafe for BoundedHandle<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more