pub struct PollEvent {
pub step: usize,
pub offset: Duration,
pub result: PollResult,
pub label: Option<String>,
}Expand description
A recorded poll event.
offset is the elapsed time since the start of the Trace this
event belongs to, expressed as a Duration. This makes events
serializable and replayable across processes.
§Examples
use async_reify::{PollEvent, PollResult};
use std::time::Duration;
let event = PollEvent {
step: 0,
offset: Duration::from_micros(150),
result: PollResult::Ready,
label: None,
};
assert_eq!(event.step, 0);Fields§
§step: usizeSequential poll index (0-based).
offset: DurationTime elapsed since the start of the parent Trace.
result: PollResultWhether the poll returned Ready, Pending, or was Cancelled by drop.
label: Option<String>Optional label for this await point.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PollEvent
impl RefUnwindSafe for PollEvent
impl Send for PollEvent
impl Sync for PollEvent
impl Unpin for PollEvent
impl UnsafeUnpin for PollEvent
impl UnwindSafe for PollEvent
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