pub struct PrimOpValue<'a> { /* private fields */ }Expand description
An owned Nix value used within a primop callback.
Unlike PrimOpArg, this owns a GC reference to the underlying value
and decrements it on drop. It is returned by ArgAttrs::get and
ArgList::get when extracting child values from collections.
Methods mirror those of PrimOpArg: value_type, force, as_int,
as_float, as_bool, as_string, as_attrs, and as_list are all
available.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PrimOpValue<'a>
impl<'a> RefUnwindSafe for PrimOpValue<'a>
impl<'a> !Send for PrimOpValue<'a>
impl<'a> !Sync for PrimOpValue<'a>
impl<'a> Unpin for PrimOpValue<'a>
impl<'a> UnsafeUnpin for PrimOpValue<'a>
impl<'a> UnwindSafe for PrimOpValue<'a>
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