pub struct Value { /* private fields */ }Expand description
A pointer to a value or thunk, to be used with EvalState methods.
§Shared Evaluation State
Multiple Value instances can reference the same underlying Nix value.
This occurs when a Value is cloned, or when multiple Nix
expressions reference the same binding.
When any reference to a thunk is evaluated—whether through
force, other EvalState methods,
or indirectly as a consequence of evaluating something else—all references
observe the evaluated result. This means
value_type_unforced
can return None (thunk) initially but a specific type later, even without
directly operating on that Value. The state will not regress back to a
less determined state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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