pub struct Reference<'id> { /* private fields */ }Expand description
An Erlang reference — a VM-unique token (enif_make_ref), commonly used to
tag a request so its reply can be matched.
Implementations§
Trait Implementations§
impl<'id> Copy for Reference<'id>
Source§impl<'id> Decoder<'id> for Reference<'id>
Accepts a reference (enif_is_ref); WrongType
otherwise.
impl<'id> Decoder<'id> for Reference<'id>
Accepts a reference (enif_is_ref); WrongType
otherwise.
Source§impl<'id> Encoder<'id> for Reference<'id>
Encodes for free by rewrapping the term’s own machine word — an otter
term is already an Erlang term. Never fails.
impl<'id> Encoder<'id> for Reference<'id>
Encodes for free by rewrapping the term’s own machine word — an otter term is already an Erlang term. Never fails.
impl Eq for Reference<'_>
Source§impl Ord for Reference<'_>
impl Ord for Reference<'_>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Reference<'_>
impl PartialOrd for Reference<'_>
Source§impl<'id> Term<'id> for Reference<'id>
impl<'id> Term<'id> for Reference<'id>
Source§fn copy_to<'dst>(self, env: impl Env<'dst>) -> AnyTerm<'dst>where
Self: Sized,
fn copy_to<'dst>(self, env: impl Env<'dst>) -> AnyTerm<'dst>where
Self: Sized,
Copy this term into another environment (
enif_make_copy), producing a
term branded to the destination. The general cross-env copy — distinct
from same-brand Encoder (which wraps for free)
and from OwnedEnvArena copy_out (the arena exit).Auto Trait Implementations§
impl<'id> !Send for Reference<'id>
impl<'id> !Sync for Reference<'id>
impl<'id> Freeze for Reference<'id>
impl<'id> RefUnwindSafe for Reference<'id>
impl<'id> Unpin for Reference<'id>
impl<'id> UnsafeUnpin for Reference<'id>
impl<'id> UnwindSafe for Reference<'id>
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