pub enum StringSelector {
StringPattern(String),
ExactMatch(String),
// some variants omitted
}
Expand description
StringSelector is an union defining different ways to describe a pattern to match strings against.
Variants§
StringPattern(String)
This is a provided string that defines a pattern to match against. The parser treats asterisks (*), colons (:) and backslashes () as special characters.
If you wish to match against literal asterisks (*), they must be escaped. If you wish to match against literal backslashes (), they must be escaped. If you wish to match against literal colons (:), they must be escaped.
eg: abc will match any string with the exact name “abc”.
eg: a* will match any string with the exact name “a*”.
eg: a\* will match any that starts with exactly “a".
eg: a* will match any string that starts with “a”.
eg: ab will match any string that starts with a and ends with b.
eg: ab*c will match any string that starts with a and ends with c, with b
in the middle.
In addition, the “**” literal is treated as a special sequence that may match multiple levels in a component selector only. See |ComponentSelector| for details.
ExactMatch(String)
This is a provided string that defines an exact string to match against. No characters are treated as special, or carry special syntax.
Implementations§
source§impl StringSelector
impl StringSelector
pub fn ordinal(&self) -> u64
pub fn unknown_variant_for_testing() -> Self
pub fn is_unknown(&self) -> bool
Trait Implementations§
source§impl Autonull for StringSelector
impl Autonull for StringSelector
source§fn naturally_nullable(_context: &Context) -> bool
fn naturally_nullable(_context: &Context) -> bool
source§impl Clone for StringSelector
impl Clone for StringSelector
source§fn clone(&self) -> StringSelector
fn clone(&self) -> StringSelector
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StringSelector
impl Debug for StringSelector
source§impl Decodable for StringSelector
impl Decodable for StringSelector
source§fn decode(&mut self, decoder: &mut Decoder<'_>, offset: usize) -> Result<()>
fn decode(&mut self, decoder: &mut Decoder<'_>, offset: usize) -> Result<()>
self
.
Callers must ensure that offset
is a multiple of
Layout::inline_align
, and that decoder.buf
has room for reading
Layout::inline_size
bytes at offset
. Read moresource§impl Encodable for StringSelector
impl Encodable for StringSelector
source§fn encode(
&mut self,
encoder: &mut Encoder<'_, '_>,
offset: usize,
recursion_depth: usize
) -> Result<()>
fn encode( &mut self, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize ) -> Result<()>
Handle::INVALID
. Callers must ensure that offset
is a
multiple of Layout::inline_align
, and that encoder.buf
has room for
writing Layout::inline_size
bytes at offset
. Read moresource§impl Layout for StringSelector
impl Layout for StringSelector
source§fn inline_align(_context: &Context) -> usize
fn inline_align(_context: &Context) -> usize
source§fn inline_size(context: &Context) -> usize
fn inline_size(context: &Context) -> usize
inline_align
.§fn supports_simple_copy() -> boolwhere
Self: Sized,
fn supports_simple_copy() -> boolwhere Self: Sized,
source§impl PartialEq<StringSelector> for StringSelector
impl PartialEq<StringSelector> for StringSelector
impl Persistable for StringSelector
impl TopLevel for StringSelector
Auto Trait Implementations§
impl RefUnwindSafe for StringSelector
impl Send for StringSelector
impl Sync for StringSelector
impl Unpin for StringSelector
impl UnwindSafe for StringSelector
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutObject for Twhere
T: Layout,
impl<T> LayoutObject for Twhere T: Layout,
§fn inline_align(&self, context: &Context) -> usize
fn inline_align(&self, context: &Context) -> usize
Layout::inline_align
.§fn inline_size(&self, context: &Context) -> usize
fn inline_size(&self, context: &Context) -> usize
Layout::inline_size
.