Struct broot::pattern::InputPattern[][src]

pub struct InputPattern {
    pub raw: String,
    pub pattern: Pattern,
}

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: Stringpattern: Pattern

Implementations

impl InputPattern[src]

pub fn none() -> Self[src]

pub fn new(
    raw: String,
    parts_expr: &BeTree<PatternOperator, PatternParts>,
    con: &AppContext
) -> Result<Self, PatternError>
[src]

pub fn is_none(&self) -> bool[src]

pub fn is_some(&self) -> bool[src]

pub fn take(&mut self) -> Self[src]

empties the pattern and return it Similar to Option::take

pub fn tree_to_preview(&self) -> Self[src]

from a pattern used to filter a tree, build a pattern which would make sense to filter a previewed file

Trait Implementations

impl Clone for InputPattern[src]

impl Debug for InputPattern[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,