Struct netidx_netproto::glob::Glob

source ·
pub struct Glob { /* private fields */ }
Expand description

Unix style globs for matching paths in the resolver. All common unix globing features are supported.

  • ? matches any character except the path separator
  • * matches zero or more characters, but not the path separator
  • ** recursively matches containers. It’s only legal uses are //foo, /foo//bar, and /foo/bar/**, which match respectively, any path ending in foo, any path starting with /foo and ending in bar, and any path starting with /foo/bar.
  • {a, b}, matches a or b where a and b are glob patterns, {} can’t be nested however.
  • [ab], [!ab], matches respectively the char a or b, and any char but a or b.
  • any of the above metacharacters can be escaped with a , a literal \ may be produced with \.

e.g. /solar/{stats,settings}/* -> all leaf paths under /solar/stats or /solar/settings. /s*/s*/** -> any path who’s first two levels start with s. /**/? -> any path who’s final component is a single character /marketdata/{IBM,MSFT,AMZN}/last

Implementations§

source§

impl Glob

source

pub fn is_glob(s: &str) -> bool

returns true if the specified string contains any non escaped glob meta chars.

source

pub fn new(raw: Chars) -> Result<Glob>

source

pub fn base(&self) -> &str

source

pub fn scope(&self) -> &Scope

source

pub fn glob(&self) -> &Glob

source

pub fn into_glob(self) -> Glob

Trait Implementations§

source§

impl Clone for Glob

source§

fn clone(&self) -> Glob

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Glob

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Pack for Glob

source§

fn encoded_len(&self) -> usize

source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), PackError>

source§

fn decode(buf: &mut impl Buf) -> Result<Self, PackError>

source§

fn const_encoded_len() -> Option<usize>

source§

fn decode_into(&mut self, buf: &mut impl Buf) -> Result<(), PackError>where
    Self: Sized,

source§

impl PartialEq<Glob> for Glob

source§

fn eq(&self, other: &Glob) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Glob

source§

impl StructuralEq for Glob

source§

impl StructuralPartialEq for Glob

Auto Trait Implementations§

§

impl RefUnwindSafe for Glob

§

impl Send for Glob

§

impl Sync for Glob

§

impl Unpin for Glob

§

impl UnwindSafe for Glob

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere
    T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.