Struct Events
struct Events { ... }
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: &Self) -> usizeReturns the number of
Eventvalues thatselfcan hold.use Events; let events = with_capacity; assert_eq!;fn is_empty(self: &Self) -> boolReturns
trueifselfcontains noEventvalues.Examples
use Events; let events = with_capacity; assert!;fn iter(self: &Self) -> Iter<'_>Returns an iterator over the
Eventvalues.Examples
# use Error; #fn clear(self: &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; #
impl Debug for Events
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
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
impl<T> Any for Events
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Events
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Events
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Events
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for Events
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Events
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Events
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>