pub fn read_events<'a>(
        &self,
        buf: &'a mut EventBuffer,
    ) -> Result<impl Iterator<Item = Result<Event>> + 'a> {
        self.read(&mut buf.0)
    }
/// Read multiple events from the userfaultfd object using the given event buffer.
///
/// If the `Uffd` object was created with `non_blocking` set to `false`, this will block until
/// an event is successfully read or an error is returned.
///
/// If `non_blocking` was `true`, this will immediately return an empty iterator if the file
/// descriptor is not ready for reading.
///
/// # Examples
///
/// ```rust
/// # use userfaultfd::{Uffd, EventBuffer};
/// fn read_events(uffd: &Uffd) -> userfaultfd::Result<()> {
///     // Read up to 100 events at a time
///     let mut buf = EventBuffer::new(100);
///     for event in uffd.read_events(&mut buf)? {
///         let event = event?;
///         // Do something with the event...
///     }
///     Ok(())
/// }
/// ```
Read multiple events from the userfaultfd object using the given event buffer.

If `non_blocking` was `true`, this will immediately return an empty iterator if the file
descriptor is not ready for reading.
Read multiple events from the userfaultfd object using the given event buffer . If ` non_blocking ` was ` true ` this will immediately return an empty iterator if the file descriptor is not ready for reading .
pub fn read_events<'a>(
        &self,
        buf: &'a mut EventBuffer,
    ) -> Result<impl Iterator<Item = Result<Event>> + 'a> {
        self.read(&mut buf.0)
    }
pub fn read_events < ' a > ( & self , buf : & ' a mut EventBuffer , ) -> Result < impl Iterator < Item = Result < Event > > + ' a > { self . read ( & mut buf . 0 ) }
Read multiple events from the userfaultfd object using the given event buffer.
Read multiple events from the userfaultfd object using the given event buffer .
&self
buf
&'a mut EventBuffer
examples
None
use userfaultfd::{uffd, eventbuffer};
fn read_events(uffd: &Uffd) -> userfaultfd::Result<()> {
Read up to 100 events at a time
let mut buf = EventBuffer::new(100);
for event in uffd.read_events(&mut buf).
fn read_events ( uffd : &Uffd ) - > userfaultfd :: Result< () > { Read up to 100 events at a time let mut buf = EventBuffer :: new ( 100 ) ; for event in uffd . read_events ( &mut buf ) .