• Home
  • Raw
  • Download

Lines Matching full:events

6 /// A collection of readiness events.
8 /// `Events` is passed as an argument to [`Poll::poll`] and will be used to
9 /// receive any new readiness events received since the last poll. Usually, a
10 /// single `Events` instance is created at the same time as a [`Poll`] and
24 /// use mio::{Events, Poll};
27 /// let mut events = Events::with_capacity(1024);
30 /// # assert!(events.is_empty());
34 /// poll.poll(&mut events, Some(Duration::from_millis(100)))?;
36 /// for event in events.iter() {
42 pub struct Events { struct
43 inner: sys::Events, argument
46 /// [`Events`] iterator.
48 /// This struct is created by the [`iter`] method on [`Events`].
50 /// [`Events`]: struct.Events.html
51 /// [`iter`]: struct.Events.html#method.iter
59 /// use mio::{Events, Poll};
62 /// let mut events = Events::with_capacity(1024);
67 /// poll.poll(&mut events, Some(Duration::from_millis(100)))?;
69 /// for event in events.iter() {
77 inner: &'a Events,
81 impl Events { implementation
82 /// Return a new `Events` capable of holding up to `capacity` events.
87 /// use mio::Events;
89 /// let events = Events::with_capacity(1024);
90 /// assert_eq!(1024, events.capacity());
92 pub fn with_capacity(capacity: usize) -> Events { in with_capacity() argument
93 Events { in with_capacity()
94 inner: sys::Events::with_capacity(capacity), in with_capacity()
101 /// use mio::Events;
103 /// let events = Events::with_capacity(1024);
104 /// assert_eq!(1024, events.capacity());
115 /// use mio::Events;
117 /// let events = Events::with_capacity(1024);
118 /// assert!(events.is_empty());
132 /// use mio::{Events, Poll};
135 /// let mut events = Events::with_capacity(1024);
140 /// poll.poll(&mut events, Some(Duration::from_millis(100)))?;
142 /// for event in events.iter() {
159 /// Events are cleared before every `poll`, so it is not required to call
168 /// use mio::{Events, Poll};
171 /// let mut events = Events::with_capacity(1024);
176 /// poll.poll(&mut events, Some(Duration::from_millis(100)))?;
178 /// // Clear all events.
179 /// events.clear();
180 /// assert!(events.is_empty());
188 /// Returns the inner `sys::Events`.
189 pub(crate) fn sys(&mut self) -> &mut sys::Events { in sys() argument
194 impl<'a> IntoIterator for &'a Events { implementation
226 impl fmt::Debug for Events { implementation