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§
Trait Implementations§
source§impl Pack for Glob
impl Pack for Glob
fn encoded_len(&self) -> usize
fn encode(&self, buf: &mut impl BufMut) -> Result<(), PackError>
fn decode(buf: &mut impl Buf) -> Result<Self, PackError>
fn const_encoded_len() -> Option<usize>
fn decode_into(&mut self, buf: &mut impl Buf) -> Result<(), PackError>where
Self: Sized,
source§impl PartialEq<Glob> for Glob
impl PartialEq<Glob> for Glob
impl Eq for Glob
impl StructuralEq for Glob
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.