Struct broot::pattern::InputPattern
source · pub struct InputPattern {
pub raw: String,
pub pattern: Pattern,
}
Expand description
wraps both
- the “pattern” (which may be used to filter and rank file entries)
- the source raw string which was used to build it and which may be put back in the input.
Fields§
§raw: String
§pattern: Pattern
Implementations§
source§impl InputPattern
impl InputPattern
pub fn none() -> Self
pub fn new(
raw: String,
parts_expr: &BeTree<PatternOperator, PatternParts>,
con: &AppContext
) -> Result<Self, PatternError>
pub fn is_none(&self) -> bool
pub fn is_some(&self) -> bool
pub fn as_option(self) -> Option<Self>
sourcepub fn tree_to_preview(&self) -> Self
pub fn tree_to_preview(&self) -> Self
from a pattern used to filter a tree, build a pattern which would make sense to filter a previewed file
Trait Implementations§
source§impl Clone for InputPattern
impl Clone for InputPattern
source§fn clone(&self) -> InputPattern
fn clone(&self) -> InputPattern
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 more