pub struct EvalStateBuilder { /* private fields */ }Expand description
Builder for Nix evaluation state.
This allows configuring the evaluation environment before creating the evaluation state.
Implementations§
Source§impl EvalStateBuilder
impl EvalStateBuilder
Sourcepub fn set_lookup_path(self, paths: &[impl AsRef<str>]) -> Result<Self>
pub fn set_lookup_path(self, paths: &[impl AsRef<str>]) -> Result<Self>
Set the lookup path (NIX_PATH) for <...> expressions.
Each entry should be in the form "name=path" or just "path",
matching the format of NIX_PATH entries.
§Errors
Returns an error if the lookup path cannot be set.
Sourcepub fn with_flake_settings(self, settings: &FlakeSettings) -> Result<Self>
pub fn with_flake_settings(self, settings: &FlakeSettings) -> Result<Self>
Sourcepub fn no_load_config(self) -> Self
pub fn no_load_config(self) -> Self
Skip loading Nix configuration from the environment.
By default build calls nix_eval_state_builder_load to
read configuration from environment variables and config files. Call
this method to skip that step, which is useful in tests or sandboxed
environments.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EvalStateBuilder
impl RefUnwindSafe for EvalStateBuilder
impl !Send for EvalStateBuilder
impl !Sync for EvalStateBuilder
impl Unpin for EvalStateBuilder
impl UnsafeUnpin for EvalStateBuilder
impl UnwindSafe for EvalStateBuilder
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