pub struct LockedFlake { /* private fields */ }Expand description
A fully locked flake.
Obtain one via LockedFlake::lock, then call
output_attrs to get the attribute set of
flake outputs.
Implementations§
Source§impl LockedFlake
impl LockedFlake
Sourcepub fn lock(
context: &Arc<Context>,
fetch_settings: &FetchersSettings,
flake_settings: &FlakeSettings,
eval_state: &EvalState,
lock_flags: &LockFlags,
flake_ref: &FlakeReference,
) -> Result<Self>
pub fn lock( context: &Arc<Context>, fetch_settings: &FetchersSettings, flake_settings: &FlakeSettings, eval_state: &EvalState, lock_flags: &LockFlags, flake_ref: &FlakeReference, ) -> Result<Self>
Lock a flake, resolving and pinning all inputs.
§Errors
Returns an error if the C API call fails or returns a null pointer.
Sourcepub fn export_json(&self) -> Result<String>
pub fn export_json(&self) -> Result<String>
Export this locked flake as an owned JSON graph.
The exported JSON contains the lock file and the source-path overrides
Nix keeps beside it for local or overridden inputs. Send this payload to
another process and reconstruct it with
ImportedLockedFlake::import_json.
§Errors
Returns an error if the C API call fails or returns invalid UTF-8.
Sourcepub fn output_attrs<'s>(
&self,
flake_settings: &FlakeSettings,
eval_state: &'s EvalState,
) -> Result<Value<'s>>
pub fn output_attrs<'s>( &self, flake_settings: &FlakeSettings, eval_state: &'s EvalState, ) -> Result<Value<'s>>
Trait Implementations§
Source§impl Drop for LockedFlake
impl Drop for LockedFlake
impl Send for LockedFlake
Auto Trait Implementations§
impl Freeze for LockedFlake
impl RefUnwindSafe for LockedFlake
impl !Sync for LockedFlake
impl Unpin for LockedFlake
impl UnsafeUnpin for LockedFlake
impl UnwindSafe for LockedFlake
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