pub struct FilterTable { /* private fields */ }Expand description
The entries in the order they answer, and the generic entry behind them all.
Implementations§
Source§impl FilterTable
impl FilterTable
Sourcepub fn builtin() -> FilterTable
pub fn builtin() -> FilterTable
Exactly three reducers ship: cargo, git, and generic.
Sourcepub fn parse(toml_text: &str) -> Result<FilterTable, AxError>
pub fn parse(toml_text: &str) -> Result<FilterTable, AxError>
Reads one FILTERS.toml. A table that does not parse is refused
rather than partially honoured.
Sourcepub fn resolve(
city: Option<&str>,
building: Option<&str>,
) -> Result<FilterTable, AxError>
pub fn resolve( city: Option<&str>, building: Option<&str>, ) -> Result<FilterTable, AxError>
Whole-value override across the ladder: the building’s table when it has one, else the city’s, else the built-in three.
Sourcepub fn lookup(&self, key: &CommandKey) -> &Filter
pub fn lookup(&self, key: &CommandKey) -> &Filter
The first entry that answers for the key, or generic.
Trait Implementations§
Source§impl Clone for FilterTable
impl Clone for FilterTable
Source§impl Debug for FilterTable
impl Debug for FilterTable
impl Eq for FilterTable
Source§impl PartialEq for FilterTable
impl PartialEq for FilterTable
impl StructuralPartialEq for FilterTable
Auto Trait Implementations§
impl Freeze for FilterTable
impl RefUnwindSafe for FilterTable
impl Send for FilterTable
impl Sync for FilterTable
impl Unpin for FilterTable
impl UnsafeUnpin for FilterTable
impl UnwindSafe for FilterTable
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