pub struct EndpointEvent(/* private fields */);
Expand description
Events sent from a Connection to an Endpoint
Implementations§
Source§impl EndpointEvent
impl EndpointEvent
Sourcepub fn drained() -> Self
pub fn drained() -> Self
Construct an event that indicating that a Connection
will no longer emit events
Useful for notifying an Endpoint
that a Connection
has been destroyed outside of the
usual state machine flow, e.g. when being dropped by the user.
Sourcepub fn is_drained(&self) -> bool
pub fn is_drained(&self) -> bool
Determine whether this is the last event a Connection
will emit
Useful for determining when connection-related event loop state can be freed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EndpointEvent
impl RefUnwindSafe for EndpointEvent
impl Send for EndpointEvent
impl Sync for EndpointEvent
impl Unpin for EndpointEvent
impl UnwindSafe for EndpointEvent
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