pub struct EventSend<E: From<Error>> { /* private fields */ }Expand description
Sender side of an explicitly bounded channel that lets us send bounded (backpressured) events, but unbounded error messages.
Implementations§
Source§impl<E: From<Error>> EventSend<E>
impl<E: From<Error>> EventSend<E>
Sourcepub fn try_permit(&self) -> Option<EventPermit>
pub fn try_permit(&self) -> Option<EventPermit>
Try to get a send permit.
Sourcepub fn send_permit(&self, evt: E, permit: EventPermit) -> Result<()>
pub fn send_permit(&self, evt: E, permit: EventPermit) -> Result<()>
Send an event with a previously acquired permit.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for EventSend<E>
impl<E> RefUnwindSafe for EventSend<E>
impl<E> Send for EventSend<E>where
E: Send,
impl<E> Sync for EventSend<E>where
E: Send,
impl<E> Unpin for EventSend<E>
impl<E> UnwindSafe for EventSend<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more