pub struct Pattern(/* private fields */);Implementations§
Source§impl Pattern
impl Pattern
Sourcepub fn iter(&self) -> impl Iterator<Item = &PatternSegment> + '_
pub fn iter(&self) -> impl Iterator<Item = &PatternSegment> + '_
Iterates over the PatternSegments of the pattern.
Sourcepub fn with_origin(&self, origin: &FullyQualifiedDomainName) -> Pattern
pub fn with_origin(&self, origin: &FullyQualifiedDomainName) -> Pattern
Returns a new pattern with the origin appended.
Sourcepub fn matches(&self, domain: &FullyQualifiedDomainName) -> bool
pub fn matches(&self, domain: &FullyQualifiedDomainName) -> bool
Returns true if the papttern matches the given domain.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pattern
impl<'de> Deserialize<'de> for Pattern
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 FromIterator<PatternSegment> for Pattern
impl FromIterator<PatternSegment> for Pattern
Source§fn from_iter<T: IntoIterator<Item = PatternSegment>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = PatternSegment>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl JsonSchema for Pattern
impl JsonSchema for Pattern
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Pattern
impl Ord for Pattern
Source§impl PartialOrd for Pattern
impl PartialOrd for Pattern
impl Eq for Pattern
impl StructuralPartialEq for Pattern
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
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