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§
Source§impl StringSelector
impl StringSelector
pub fn ordinal(&self) -> u64
pub fn unknown_variant_for_testing() -> StringSelector
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> Decode<StringSelector, D> for StringSelectorwhere
D: ResourceDialect,
impl<D> Decode<StringSelector, D> for StringSelectorwhere
D: ResourceDialect,
Source§fn new_empty() -> StringSelector
fn new_empty() -> StringSelector
Self
. The specific value does not matter,
since it will be overwritten by decode
.Source§impl<D> Encode<StringSelector, D> for &StringSelectorwhere
D: ResourceDialect,
impl<D> Encode<StringSelector, D> for &StringSelectorwhere
D: ResourceDialect,
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
.Source§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 moreSource§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 moreSource§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
.impl Persistable for StringSelector
Auto Trait Implementations§
impl Freeze for StringSelector
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> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
Source§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
Source§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T
to [Self
]