pub struct NixLibHelper;Expand description
Helpers for emitting lib.* function calls.
Implementations§
Source§impl NixLibHelper
impl NixLibHelper
Sourcepub fn mk_option(
ty: NixExpr,
default: Option<NixExpr>,
description: Option<&str>,
) -> NixExpr
pub fn mk_option( ty: NixExpr, default: Option<NixExpr>, description: Option<&str>, ) -> NixExpr
Generate lib.mkOption { type; default; description; }.
Sourcepub fn mk_default(value: NixExpr) -> NixExpr
pub fn mk_default(value: NixExpr) -> NixExpr
Generate lib.mkDefault value.
Sourcepub fn type_list_of(ty: NixExpr) -> NixExpr
pub fn type_list_of(ty: NixExpr) -> NixExpr
Generate lib.types.listOf T.
Sourcepub fn type_attrs_of(ty: NixExpr) -> NixExpr
pub fn type_attrs_of(ty: NixExpr) -> NixExpr
Generate lib.types.attrsOf T.
Sourcepub fn concat_map_strings(f: NixExpr, list: NixExpr) -> NixExpr
pub fn concat_map_strings(f: NixExpr, list: NixExpr) -> NixExpr
Generate lib.concatMapStrings f list.
Sourcepub fn concat_strings_sep(sep: &str, list: NixExpr) -> NixExpr
pub fn concat_strings_sep(sep: &str, list: NixExpr) -> NixExpr
Generate lib.concatStringsSep sep list.
Sourcepub fn map_attrs_to_list(f: NixExpr, attrs: NixExpr) -> NixExpr
pub fn map_attrs_to_list(f: NixExpr, attrs: NixExpr) -> NixExpr
Generate lib.mapAttrsToList f attrs.
Auto Trait Implementations§
impl Freeze for NixLibHelper
impl RefUnwindSafe for NixLibHelper
impl Send for NixLibHelper
impl Sync for NixLibHelper
impl Unpin for NixLibHelper
impl UnsafeUnpin for NixLibHelper
impl UnwindSafe for NixLibHelper
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