pub struct FlakeSettings { /* private fields */ }Expand description
Configuration for the Nix flake subsystem.
This enables flake evaluation features in the Nix evaluator (such as
builtins.getFlake). Obtain a FlakeSettings and pass it to
EvalStateBuilder::with_flake_settings
before building the EvalState.
§Example
use std::sync::Arc;
use nix_bindings::{Context, EvalStateBuilder, Store, flake::FlakeSettings};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let ctx = Arc::new(Context::new()?);
let store = Arc::new(Store::open(&ctx, None)?);
let flake_settings = FlakeSettings::new(&ctx)?;
let state = EvalStateBuilder::new(&store)?
.with_flake_settings(&flake_settings)?
.build()?;
Ok(())
}Implementations§
Trait Implementations§
Source§impl Drop for FlakeSettings
impl Drop for FlakeSettings
impl Send for FlakeSettings
Auto Trait Implementations§
impl Freeze for FlakeSettings
impl RefUnwindSafe for FlakeSettings
impl !Sync for FlakeSettings
impl Unpin for FlakeSettings
impl UnsafeUnpin for FlakeSettings
impl UnwindSafe for FlakeSettings
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