ParseGlobPathBuilder

Struct ParseGlobPathBuilder 

Source
pub struct ParseGlobPathBuilder<'f1, S: State = Empty> { /* private fields */ }
Available on (crate features syntax-glob or syntax-ev or syntax-regex) and crate feature syntax-glob only.
Expand description

Use builder syntax to set the inputs and finish with call().

Implementations§

Source§

impl<'f1, S: State> ParseGlobPathBuilder<'f1, S>

Source

pub fn call(self, pattern: &'f1 str) -> Hir
where S: IsComplete,

Finishes building and performs the requested action.

Source

pub fn pattern_separator( self, value: PathSeparator, ) -> ParseGlobPathBuilder<'f1, SetPatternSeparator<S>>
where S::PatternSeparator: IsUnset,

Optional (Some / Option setters).

The separator used in the pattern. Can be different from the one used in the haystacks to be matched.

Defaults to the same as separator. You may want to use PathSeparator::Any instead.

Source

pub fn maybe_pattern_separator( self, value: Option<PathSeparator>, ) -> ParseGlobPathBuilder<'f1, SetPatternSeparator<S>>
where S::PatternSeparator: IsUnset,

Optional (Some / Option setters).

The separator used in the pattern. Can be different from the one used in the haystacks to be matched.

Defaults to the same as separator. You may want to use PathSeparator::Any instead.

Source

pub fn separator( self, value: PathSeparator, ) -> ParseGlobPathBuilder<'f1, SetSeparator<S>>
where S::Separator: IsUnset,

Required.

The path separator used in the haystacks to be matched.

Only have effect on ? and *.

Source

pub fn surrounding_wildcard_as_anchor( self, value: bool, ) -> ParseGlobPathBuilder<'f1, SetSurroundingWildcardAsAnchor<S>>
where S::SurroundingWildcardAsAnchor: IsUnset,

Optional (Some / Option setters). Default: true.

See surrounding wildcards as anchors.

Source

pub fn maybe_surrounding_wildcard_as_anchor( self, value: Option<bool>, ) -> ParseGlobPathBuilder<'f1, SetSurroundingWildcardAsAnchor<S>>
where S::SurroundingWildcardAsAnchor: IsUnset,

Optional (Some / Option setters). Default: true.

See surrounding wildcards as anchors.

Source

pub fn ext(self, value: GlobExtConfig) -> ParseGlobPathBuilder<'f1, SetExt<S>>
where S::Ext: IsUnset,

Optional (Some / Option setters). Default: <GlobExtConfig as Default>::default().

Source

pub fn maybe_ext( self, value: Option<GlobExtConfig>, ) -> ParseGlobPathBuilder<'f1, SetExt<S>>
where S::Ext: IsUnset,

Optional (Some / Option setters). Default: <GlobExtConfig as Default>::default().

Auto Trait Implementations§

§

impl<'f1, S> Freeze for ParseGlobPathBuilder<'f1, S>

§

impl<'f1, S> RefUnwindSafe for ParseGlobPathBuilder<'f1, S>

§

impl<'f1, S> Send for ParseGlobPathBuilder<'f1, S>

§

impl<'f1, S> Sync for ParseGlobPathBuilder<'f1, S>

§

impl<'f1, S> Unpin for ParseGlobPathBuilder<'f1, S>

§

impl<'f1, S> UnwindSafe for ParseGlobPathBuilder<'f1, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.