pubstruct Events { /// Raw I/O event completions are filled in here by the call to `get_many` /// on the completion port above. These are then processed to run callbacks /// which figure out what to do after the event is done. pub statuses: Box<[CompletionStatus]>,
/// Literal events returned by `get` to the upwards `EventLoop`. This file /// doesn't really modify this (except for the waker), instead almost all /// events are filled in by the `ReadinessQueue` from the `poll` module. pub events: Vec<Event>,
}
impl Events { pubfn with_capacity(cap: usize) -> Events { // Note that it's possible for the output `events` to grow beyond the // capacity as it can also include deferred events, but that's certainly // not the end of the world!
Events {
statuses: vec![CompletionStatus::zero(); cap].into_boxed_slice(),
events: Vec::with_capacity(cap),
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.