Struct broot::pattern::SearchModeMap
source · [−]pub struct SearchModeMap {
pub entries: Vec<SearchModeMapEntry>,
}
Expand description
manage how to find the search mode to apply to a pattern taking the config in account.
Fields
entries: Vec<SearchModeMapEntry>
Implementations
sourceimpl SearchModeMap
impl SearchModeMap
pub fn setm(&mut self, keys: &[&str], mode: SearchMode)
sourcepub fn set(&mut self, entry: SearchModeMapEntry)
pub fn set(&mut self, entry: SearchModeMapEntry)
we don’t remove existing entries to ensure there’s always a matching entry in mode->key (but search iterations will be done in reverse)
pub fn search_mode(
&self,
key: Option<&String>
) -> Result<SearchMode, PatternError>
pub fn key(&self, search_mode: SearchMode) -> Option<&String>
Trait Implementations
sourceimpl Clone for SearchModeMap
impl Clone for SearchModeMap
sourcefn clone(&self) -> SearchModeMap
fn clone(&self) -> SearchModeMap
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SearchModeMap
impl Debug for SearchModeMap
sourceimpl Default for SearchModeMap
impl Default for SearchModeMap
Auto Trait Implementations
impl RefUnwindSafe for SearchModeMap
impl Send for SearchModeMap
impl Sync for SearchModeMap
impl Unpin for SearchModeMap
impl UnwindSafe for SearchModeMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more