[][src]Struct sub_strs::Glob

pub struct Glob<'a> { /* fields omitted */ }

Glob

This struct is used to find matches from a pattern string against some string.

The pattern string supports 2 special characters: * and ?:

  • *: matches any characters or nothing at all.
  • ?: matches one single character.

Notes

Methods

impl<'a> Glob<'a>[src]

pub fn new(src: &'a str) -> Self[src]

pub fn matches<S>(&self, s: S) -> bool where
    S: AsRef<str>, 
[src]

Trait Implementations

impl<'_> PartialEq<Glob<'_>> for Glob<'_>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> From<&'a str> for Glob<'a>[src]

impl<'a> Eq for Glob<'a>[src]

impl<'a> Debug for Glob<'a>[src]

impl<'_> Display for Glob<'_>[src]

impl<'_> Hash for Glob<'_>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<'a> Send for Glob<'a>

impl<'a> Sync for Glob<'a>

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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