Enum StringSelector
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)
Implementations§
§impl StringSelector
impl StringSelector
pub fn ordinal(&self) -> u64
pub fn unknown_variant_for_testing() -> StringSelector
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for StringSelector
impl Clone for StringSelector
§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 more§impl Debug for StringSelector
impl Debug for StringSelector
§impl<D> Decode<StringSelector, D> for StringSelectorwhere
D: ResourceDialect,
impl<D> Decode<StringSelector, D> for StringSelectorwhere
D: ResourceDialect,
§fn new_empty() -> StringSelector
fn new_empty() -> StringSelector
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<StringSelector, D> for &StringSelectorwhere
D: ResourceDialect,
impl<D> Encode<StringSelector, D> for &StringSelectorwhere
D: ResourceDialect,
§impl PartialEq for StringSelector
impl PartialEq for StringSelector
§impl TypeMarker for StringSelector
impl TypeMarker for StringSelector
§type Owned = StringSelector
type Owned = StringSelector
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§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.§impl ValueTypeMarker for StringSelector
impl ValueTypeMarker for StringSelector
§type Borrowed<'a> = &'a StringSelector
type Borrowed<'a> = &'a StringSelector
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<StringSelector as TypeMarker>::Owned,
) -> <StringSelector as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<StringSelector as TypeMarker>::Owned, ) -> <StringSelector as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.