Struct Events
pub struct Events { /* private fields */ }
A collection of readiness events.
Events is passed as an argument to Poll::poll and will be used to
receive any new readiness events received since the last poll. Usually, a
single Events instance is created at the same time as a Poll and
reused on each call to Poll::poll.
See Poll for more documentation on polling.
Examples
# use Error;
#
Implementations
impl Events
fn with_capacity(capacity: usize) -> EventsReturn a new
Eventscapable of holding up tocapacityevents.Examples
use Events; let events = with_capacity; assert_eq!;fn capacity(&self) -> usizeReturns the number of
Eventvalues thatselfcan hold.use Events; let events = with_capacity; assert_eq!;fn is_empty(&self) -> boolReturns
trueifselfcontains noEventvalues.Examples
use Events; let events = with_capacity; assert!;fn iter(&self) -> Iter<'_>Returns an iterator over the
Eventvalues.Examples
# use Error; #fn clear(&mut self)Clearing all
Eventvalues from container explicitly.Notes
Events are cleared before every
poll, so it is not required to call this manually.Examples
# use Error; #
Trait Implementations
impl Debug for Events
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl Freeze for Events
impl RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnsafeUnpin for Events
impl UnwindSafe for Events
Blanket Implementations
impl<T> Any for Events
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Events
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Events
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Events
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for Events
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Events
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Events
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>