pub struct ConfigDir {
pub entries: Vec<ConfigTable>,
}Expand description
A configuration Dir: library id to table.
Fields§
§entries: Vec<ConfigTable>Tables carried by this Dir.
Implementations§
Source§impl ConfigDir
impl ConfigDir
Sourcepub fn one(lib: Symbol, table: Expr) -> ConfigResult<Self>
pub fn one(lib: Symbol, table: Expr) -> ConfigResult<Self>
Creates a Dir with one library table.
Sourcepub fn table(&self, lib: &Symbol) -> Option<&ConfigTable>
pub fn table(&self, lib: &Symbol) -> Option<&ConfigTable>
Finds a table by library id.
Sourcepub fn table_mut(&mut self, lib: &Symbol) -> Option<&mut ConfigTable>
pub fn table_mut(&mut self, lib: &Symbol) -> Option<&mut ConfigTable>
Finds a mutable table by library id.
Sourcepub fn upsert(&mut self, table: ConfigTable)
pub fn upsert(&mut self, table: ConfigTable)
Inserts or replaces a table for its library id.
Sourcepub fn from_dir_expr(expr: &Expr) -> ConfigResult<Self>
pub fn from_dir_expr(expr: &Expr) -> ConfigResult<Self>
Builds a Dir from a map of library id keys to table values.
Trait Implementations§
impl Eq for ConfigDir
impl StructuralPartialEq for ConfigDir
Auto Trait Implementations§
impl Freeze for ConfigDir
impl RefUnwindSafe for ConfigDir
impl Send for ConfigDir
impl Sync for ConfigDir
impl Unpin for ConfigDir
impl UnsafeUnpin for ConfigDir
impl UnwindSafe for ConfigDir
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