pub struct Library { /* private fields */ }Expand description
Reads device files from a Source, caching parsed files.
Implementations§
Source§impl Library
impl Library
Sourcepub fn resolve(&self, path: &str) -> Result<Value, ConfigError>
pub fn resolve(&self, path: &str) -> Result<Value, ConfigError>
A file with every $import resolved (conditions not yet evaluated).
Sourcepub fn index(&self) -> Vec<Result<IndexEntry, ConfigError>>
pub fn index(&self) -> Vec<Result<IndexEntry, ConfigError>>
Every device file’s identity (template files excluded).
Sourcepub fn lookup(&self, id: &DeviceId) -> Result<Option<DeviceConfig>, ConfigError>
pub fn lookup(&self, id: &DeviceId) -> Result<Option<DeviceConfig>, ConfigError>
Finds the file for a device and evaluates it for its firmware.
Sourcepub fn load(
&self,
path: &str,
id: &DeviceId,
) -> Result<DeviceConfig, ConfigError>
pub fn load( &self, path: &str, id: &DeviceId, ) -> Result<DeviceConfig, ConfigError>
Loads one file and evaluates it for a device.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Library
impl !RefUnwindSafe for Library
impl !UnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
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