StartsWith

Trait StartsWith 

Source
pub trait StartsWith<Prefix: ?Sized> {
    // Required methods
    fn starts_with(&self, prefix: &Prefix) -> bool;
    fn starts_with_exactly(&self, prefix: &Prefix) -> bool;
}
Expand description

This trait abstracts over the concept of matching a prefix pattern against a path

Required Methods§

Source

fn starts_with(&self, prefix: &Prefix) -> bool

Returns true if the current path, sans root component, starts with prefix

Source

fn starts_with_exactly(&self, prefix: &Prefix) -> bool

Returns true if the current path, including root component, starts with prefix

Implementors§