Struct relay_protocol::condition::GlobCondition
source · pub struct GlobCondition {
pub name: String,
pub value: TypedPatterns<CaseInsensitive>,
}
Expand description
A condition that uses glob matching.
This is similar to EqCondition
, but it allows for wildcards in value
. This is slightly
more expensive to construct and check, so preferrably use EqCondition
when no wildcard
matching is needed.
Fields§
§name: String
Path of the field that should match the value.
value: TypedPatterns<CaseInsensitive>
A list of glob patterns to check.
Note that this cannot be a single value, it must be a list of values.
Implementations§
source§impl GlobCondition
impl GlobCondition
sourcepub fn new(field: impl Into<String>, value: impl IntoStrings) -> Self
pub fn new(field: impl Into<String>, value: impl IntoStrings) -> Self
Creates a condition that matches one or more glob patterns.
Trait Implementations§
source§impl Clone for GlobCondition
impl Clone for GlobCondition
source§fn clone(&self) -> GlobCondition
fn clone(&self) -> GlobCondition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GlobCondition
impl Debug for GlobCondition
source§impl<'de> Deserialize<'de> for GlobCondition
impl<'de> Deserialize<'de> for GlobCondition
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for GlobCondition
impl PartialEq for GlobCondition
source§impl Serialize for GlobCondition
impl Serialize for GlobCondition
impl StructuralPartialEq for GlobCondition
Auto Trait Implementations§
impl Freeze for GlobCondition
impl RefUnwindSafe for GlobCondition
impl Send for GlobCondition
impl Sync for GlobCondition
impl Unpin for GlobCondition
impl UnwindSafe for GlobCondition
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)