#[repr(transparent)]pub struct ResourceFlags(pub c_int);Expand description
Create-or-take-over flags for registering a resource type.
Combine with |, e.g. ResourceFlags::CREATE | ResourceFlags::TAKEOVER.
Passed to open_resource_type and friends, which report through their
tried out-parameter which operation actually occurred.
ErlNifResourceFlags — NIF 1.0 — OTP R13B04
Tuple Fields§
§0: c_intImplementations§
Source§impl ResourceFlags
impl ResourceFlags
Sourcepub const CREATE: Self
pub const CREATE: Self
Register the name as a new resource type.
Combine with ResourceFlags::TAKEOVER to accept either a fresh
registration or a takeover of an existing one.
ERL_NIF_RT_CREATE — NIF 1.0 — OTP R13B04
Sourcepub const TAKEOVER: Self
pub const TAKEOVER: Self
Take over an existing resource type during a code upgrade.
Lets the new library inherit a type registered by the version it replaces.
Combine with ResourceFlags::CREATE to allow either.
ERL_NIF_RT_TAKEOVER — NIF 1.0 — OTP R13B04
Trait Implementations§
Source§impl BitOr for ResourceFlags
impl BitOr for ResourceFlags
Source§impl Clone for ResourceFlags
impl Clone for ResourceFlags
Source§fn clone(&self) -> ResourceFlags
fn clone(&self) -> ResourceFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResourceFlags
impl Eq for ResourceFlags
Source§impl PartialEq for ResourceFlags
impl PartialEq for ResourceFlags
Source§fn eq(&self, other: &ResourceFlags) -> bool
fn eq(&self, other: &ResourceFlags) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResourceFlags
Auto Trait Implementations§
impl Freeze for ResourceFlags
impl RefUnwindSafe for ResourceFlags
impl Send for ResourceFlags
impl Sync for ResourceFlags
impl Unpin for ResourceFlags
impl UnsafeUnpin for ResourceFlags
impl UnwindSafe for ResourceFlags
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