#[repr(transparent)]pub struct Kqueue(_);
Available on crate feature
event
only.Expand description
A kernel event queue.
Used by the kernel to notify the process of various types of asynchronous events.
Implementations§
source§impl Kqueue
impl Kqueue
sourcepub fn kevent(
&self,
changelist: &[KEvent],
eventlist: &mut [KEvent],
timeout_opt: Option<timespec>
) -> Result<usize>
pub fn kevent( &self, changelist: &[KEvent], eventlist: &mut [KEvent], timeout_opt: Option<timespec> ) -> Result<usize>
Register new events with the kqueue, and return any pending events to the user.
This method will block until either the timeout expires, or a registered event triggers a notification.
Arguments
changelist
- Any new kevents to register for notifications.eventlist
- Storage space for the kernel to return notifications.timeout
- An optional timeout.
Returns
Returns the number of events placed in the eventlist
. If an error
occurs while processing an element of the changelist
and there is
enough room in the eventlist
, then the event will be placed in the
eventlist
with EV_ERROR
set in flags
and the system error in
data
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Kqueue
impl Send for Kqueue
impl Sync for Kqueue
impl Unpin for Kqueue
impl UnwindSafe for Kqueue
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