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§
Source§impl<'de> Deserialize<'de> for PollEvent
impl<'de> Deserialize<'de> for PollEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PollEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PollEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PollEvent
impl Serialize for PollEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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