Struct nix::sys::signal::SigEvent

source ·
#[repr(C)]
pub struct SigEvent { /* private fields */ }
Expand description

Used to request asynchronous notification of the completion of certain events, such as POSIX AIO and timers.

Implementations§

source§

impl SigEvent

source

pub fn new(sigev_notify: SigevNotify) -> SigEvent

Note: this constructor does not allow the user to set the sigev_notify_kevent_flags field. That’s considered ok because on FreeBSD at least those flags don’t do anything useful. That field is part of a union that shares space with the more genuinely useful fields.

Note: This constructor also doesn’t allow the caller to set the sigev_notify_function or sigev_notify_attributes fields, which are required for SIGEV_THREAD. That’s considered ok because on no operating system is SIGEV_THREAD the most efficient way to deliver AIO notification. FreeBSD and DragonFly BSD programs should prefer SIGEV_KEVENT. Linux, Solaris, and portable programs should prefer SIGEV_THREAD_ID or SIGEV_SIGNAL. That field is part of a union that shares space with the more genuinely useful sigev_notify_thread_id

source

pub fn sigevent(&self) -> sigevent

Return a copy of the inner structure

source

pub fn as_mut_ptr(&mut self) -> *mut sigevent

Returns a mutable pointer to the sigevent wrapped by self

Trait Implementations§

source§

impl Clone for SigEvent

source§

fn clone(&self) -> SigEvent

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 SigEvent

source§

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

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

impl<'a> From<&'a sigevent> for SigEvent

source§

fn from(sigevent: &sigevent) -> Self

Converts to this type from the input type.
source§

impl Hash for SigEvent

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 for SigEvent

source§

fn eq(&self, other: &SigEvent) -> 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 SigEvent

source§

impl Eq for SigEvent

source§

impl StructuralEq for SigEvent

source§

impl StructuralPartialEq for SigEvent

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where 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 T
where 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 T
where 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.