pub struct TaggedEvent {
pub now: Instant,
pub event: Event,
}Expand description
An Event together with the instant its condition was observed at.
The agent’s events are produced inside handle_read / handle_timeout / close, all of
which know the time, but they are consumed from poll_event, which does not. Carrying the
instant in the payload means the consumer is told when the condition happened rather than
having to retain an instant of its own and guess — the same channel TaggedBytesMut already
provides on the read path.
Fields§
§now: InstantWhen the condition this event reports was observed.
event: EventThe event itself.
Auto Trait Implementations§
impl Freeze for TaggedEvent
impl RefUnwindSafe for TaggedEvent
impl Send for TaggedEvent
impl Sync for TaggedEvent
impl Unpin for TaggedEvent
impl UnsafeUnpin for TaggedEvent
impl UnwindSafe for TaggedEvent
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