pub struct MonitorSocket { /* private fields */ }Expand description
An active monitor that can receive events.
The events received by a MonitorSocket match the filters setup by the Monitor that created
the socket.
Monitors are initially setup to receive events from the kernel via a nonblocking socket. A
variant of poll() should be used on the file descriptor returned by the AsRawFd trait to
wait for new events.
Implementations§
Source§impl MonitorSocket
impl MonitorSocket
Sourcepub fn receive_event(&mut self) -> Option<Event>
pub fn receive_event(&mut self) -> Option<Event>
Receives the next available event from the monitor.
This method does not block. If no events are available, it returns None immediately.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MonitorSocket
impl RefUnwindSafe for MonitorSocket
impl !Send for MonitorSocket
impl !Sync for MonitorSocket
impl Unpin for MonitorSocket
impl UnwindSafe for MonitorSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more