#[repr(transparent)]pub struct SelectFlags(pub c_int);Expand description
Mode flags for select. Combine with |.
For example SelectFlags::READ | SelectFlags::CUSTOM_MSG. Defined in
erl_drv_nif.h; each flag carries its own introduction version, as the
cancel, custom-message, and error modes were added after the base ones.
ErlNifSelectFlags — NIF 2.12 — OTP 20
Tuple Fields§
§0: c_intImplementations§
Source§impl SelectFlags
impl SelectFlags
Sourcepub const READ: Self
pub const READ: Self
Select for read readiness.
ERL_NIF_SELECT_READ — NIF 2.12 — OTP 20
Sourcepub const WRITE: Self
pub const WRITE: Self
Select for write readiness.
ERL_NIF_SELECT_WRITE — NIF 2.12 — OTP 20
Sourcepub const STOP: Self
pub const STOP: Self
Stop selecting on the event and trigger the resource stop callback.
The safe way to retire an OS event before closing it: any active read/write
selections are cancelled first, then the resource’s stop callback is called
— directly or scheduled — once no notification can still be in flight. The
event must not be closed until that callback has run. pid and ref are
ignored.
ERL_NIF_SELECT_STOP — NIF 2.12 — OTP 20
Sourcepub const CANCEL: Self
pub const CANCEL: Self
Cancel a pending read or write select without stopping.
Combine with SelectFlags::READ and/or SelectFlags::WRITE to choose
which selections to cancel; pid and ref are ignored. The return
value’s *_CANCELLED bits report whether each was actually removed or
whether a notification may already have been sent.
ERL_NIF_SELECT_CANCEL — NIF 2.15 — OTP 22
Sourcepub const CUSTOM_MSG: Self
pub const CUSTOM_MSG: Self
Deliver msg as a custom message instead of the default select message.
ERL_NIF_SELECT_CUSTOM_MSG — NIF 2.15 — OTP 22
Sourcepub const ERROR: Self
pub const ERROR: Self
Select for error conditions on the event.
ERL_NIF_SELECT_ERROR — NIF 2.16 — OTP 24
Trait Implementations§
Source§impl BitOr for SelectFlags
impl BitOr for SelectFlags
Source§impl Clone for SelectFlags
impl Clone for SelectFlags
Source§fn clone(&self) -> SelectFlags
fn clone(&self) -> SelectFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SelectFlags
impl Eq for SelectFlags
Source§impl PartialEq for SelectFlags
impl PartialEq for SelectFlags
Source§fn eq(&self, other: &SelectFlags) -> bool
fn eq(&self, other: &SelectFlags) -> bool
self and other values to be equal, and is used by ==.