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§
source§impl 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§
source§impl Clone for SearchModeMap
impl Clone for SearchModeMap
source§fn clone(&self) -> SearchModeMap
fn clone(&self) -> SearchModeMap
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SearchModeMap
impl Debug for SearchModeMap
source§impl 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§
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
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.