Struct nix::sys::event::KEvent

source ·
#[repr(C)]
pub struct KEvent { /* private fields */ }
Available on crate feature event only.
Expand description

A kernel event queue. Used to notify a process of various asynchronous events.

Implementations§

source§

impl KEvent

source

pub fn new( ident: uintptr_t, filter: EventFilter, flags: EventFlag, fflags: FilterFlag, data: intptr_t, udata: intptr_t ) -> KEvent

Construct a new KEvent suitable for submission to the kernel via the changelist argument of Kqueue::kevent.

source

pub fn ident(&self) -> uintptr_t

Value used to identify this event. The exact interpretation is determined by the attached filter, but often is a raw file descriptor.

source

pub fn filter(&self) -> Result<EventFilter>

Identifies the kernel filter used to process this event.

Will only return an error if the kernel reports an event via a filter that is unknown to Nix.

source

pub fn flags(&self) -> EventFlag

Flags control what the kernel will do when this event is added with Kqueue::kevent.

source

pub fn fflags(&self) -> FilterFlag

Filter-specific flags.

source

pub fn data(&self) -> intptr_t

Filter-specific data value.

source

pub fn udata(&self) -> intptr_t

Opaque user-defined value passed through the kernel unchanged.

Trait Implementations§

source§

impl Clone for KEvent

source§

fn clone(&self) -> KEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for KEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for KEvent

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<KEvent> for KEvent

source§

fn eq(&self, other: &KEvent) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for KEvent

source§

impl Eq for KEvent

source§

impl Send for KEvent

source§

impl StructuralEq for KEvent

source§

impl StructuralPartialEq for KEvent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.