#[non_exhaustive]pub enum PatternType {
Unknown,
Any,
Match,
Literal,
Prefixed,
}Expand description
Resource pattern type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
Represents any PatternType which this client cannot understand,
perhaps because this client is too old.
Any
In a filter, matches any resource pattern type.
Match
In a filter, will perform pattern matching.
Literal
A literal resource name.
A literal name defines the full name of a resource, e.g. topic with name
‘foo’, or group with name ‘bob’. The special wildcard character * can
be used to represent a resource with any name.
Prefixed
A prefixed resource name.
A prefixed name defines a prefix for a resource, e.g. topics with names that start with ‘foo’.
Implementations§
Source§impl PatternType
impl PatternType
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns whether this resource pattern type is PatternType::Unknown.
Sourcepub fn is_specific(&self) -> bool
pub fn is_specific(&self) -> bool
Returns whether this resource pattern type is a concrete type, rather than
UNKNOWN or one of the filter types.
Sourcepub fn from_code(code: i8) -> PatternType
pub fn from_code(code: i8) -> PatternType
Returns the PatternType with the provided code or PatternType::Unknown
if one cannot be found.
§Arguments
code- the code to look up
Sourcepub fn from_string(name: &str) -> PatternType
pub fn from_string(name: &str) -> PatternType
Returns the PatternType with the provided name or PatternType::Unknown
if one cannot be found.
§Arguments
name- the constant’s name, matched case-sensitively
Trait Implementations§
Source§impl Clone for PatternType
impl Clone for PatternType
Source§fn clone(&self) -> PatternType
fn clone(&self) -> PatternType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PatternType
impl Debug for PatternType
Source§impl Display for PatternType
impl Display for PatternType
Source§impl Hash for PatternType
impl Hash for PatternType
Source§impl Ord for PatternType
impl Ord for PatternType
Source§fn cmp(&self, other: &PatternType) -> Ordering
fn cmp(&self, other: &PatternType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PatternType
impl PartialEq for PatternType
Source§impl PartialOrd for PatternType
impl PartialOrd for PatternType
impl Copy for PatternType
impl Eq for PatternType
impl StructuralPartialEq for PatternType
Auto Trait Implementations§
impl Freeze for PatternType
impl RefUnwindSafe for PatternType
impl Send for PatternType
impl Sync for PatternType
impl Unpin for PatternType
impl UnsafeUnpin for PatternType
impl UnwindSafe for PatternType
Blanket Implementations§
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.