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 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<D: ResourceDialect> Decode<StringSelector, D> for StringSelector
impl<D: ResourceDialect> Decode<StringSelector, D> for StringSelector
Source§impl<D: ResourceDialect> Encode<StringSelector, D> for &StringSelector
impl<D: ResourceDialect> Encode<StringSelector, D> for &StringSelector
Source§impl PartialEq for StringSelector
impl PartialEq for StringSelector
Source§impl TypeMarker for StringSelector
impl TypeMarker for StringSelector
Source§type Owned = StringSelector
type Owned = 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 encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for StringSelector
impl ValueTypeMarker for StringSelector
Source§type Borrowed<'a> = &'a StringSelector
type Borrowed<'a> = &'a StringSelector
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more