pub struct NixModule {
pub top_level: NixExpr,
pub is_module_file: bool,
}Expand description
A complete Nix file (module).
In NixOS, module files have a specific structure:
{ config, pkgs, lib, ... }:
{
options = { ... };
config = { ... };
}Plain Nix files are just a single expression.
Fields§
§top_level: NixExprThe top-level expression of the file
is_module_file: boolWhether this is a NixOS module file (adds the standard module header comment)
Implementations§
Trait Implementations§
impl StructuralPartialEq for NixModule
Auto Trait Implementations§
impl Freeze for NixModule
impl RefUnwindSafe for NixModule
impl Send for NixModule
impl Sync for NixModule
impl Unpin for NixModule
impl UnsafeUnpin for NixModule
impl UnwindSafe for NixModule
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