pub struct ModuleFile { /* private fields */ }Expand description
A parsed guix module file (e.g. gnu/packages/*.scm), lossless.
Implementations§
Source§impl ModuleFile
impl ModuleFile
pub fn parse(src: &str) -> Result<Self, Error>
Sourcepub fn package_names(&self) -> Vec<String>
pub fn package_names(&self) -> Vec<String>
Names bound by top-level (define-public <sym> ...) forms whose
value contains a (package ...) / (package/inherit ...) node,
including under wrappers like let. Packages behind quoted or
non-list contexts are not matched.
pub fn package(&self, sym: &str) -> Option<PackageView<'_>>
pub fn package_mut(&mut self, sym: &str) -> Option<PackageViewMut<'_>>
Sourcepub fn record_type_names(&self) -> Vec<String>
pub fn record_type_names(&self) -> Vec<String>
Names of top-level define-record-type* forms, e.g.
<avahi-configuration>.
Sourcepub fn record_type(&self, name: &str) -> Option<RecordTypeView<'_>>
pub fn record_type(&self, name: &str) -> Option<RecordTypeView<'_>>
Read-only view over a top-level define-record-type* form,
looked up by its type name (e.g. <avahi-configuration>).
Trait Implementations§
Source§impl Debug for ModuleFile
impl Debug for ModuleFile
Auto Trait Implementations§
impl Freeze for ModuleFile
impl RefUnwindSafe for ModuleFile
impl Send for ModuleFile
impl Sync for ModuleFile
impl Unpin for ModuleFile
impl UnsafeUnpin for ModuleFile
impl UnwindSafe for ModuleFile
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