Enum kubizone_common::DomainName
source · pub enum DomainName {
Full(FullyQualifiedDomainName),
Partial(PartiallyQualifiedDomainName),
}Expand description
Either a FullyQualifiedDomainName or a PartiallyQualifiedDomainName.
Variants§
Full(FullyQualifiedDomainName)
Domain name is fully qualified.
Partial(PartiallyQualifiedDomainName)
Domain name is partially qualified.
Implementations§
source§impl DomainName
impl DomainName
sourcepub fn is_fully_qualified(&self) -> bool
pub fn is_fully_qualified(&self) -> bool
Returns true if domain is fully qualified.
sourcepub fn is_partially_qualified(&self) -> bool
pub fn is_partially_qualified(&self) -> bool
Returns true if domain is only partially qualified.
sourcepub fn as_partial(&self) -> Option<&PartiallyQualifiedDomainName>
pub fn as_partial(&self) -> Option<&PartiallyQualifiedDomainName>
Returns None if fully qualified, or a reference to the contained partially qualified domain otherwise.
sourcepub fn as_full(&self) -> Option<&FullyQualifiedDomainName>
pub fn as_full(&self) -> Option<&FullyQualifiedDomainName>
Returns None if partially qualified, or a reference to the contained fully qualified domain otherwise.
sourcepub fn iter(&self) -> Iter<'_, DomainSegment>
pub fn iter(&self) -> Iter<'_, DomainSegment>
Iterates over all DomainSegments that make up the domain name.
Trait Implementations§
source§impl Add<&DomainName> for DomainSegment
impl Add<&DomainName> for DomainSegment
§type Output = DomainName
type Output = DomainName
The resulting type after applying the
+ operator.source§impl Add<DomainName> for DomainSegment
impl Add<DomainName> for DomainSegment
§type Output = DomainName
type Output = DomainName
The resulting type after applying the
+ operator.source§impl AsRef<[DomainSegment]> for DomainName
impl AsRef<[DomainSegment]> for DomainName
source§fn as_ref(&self) -> &[DomainSegment]
fn as_ref(&self) -> &[DomainSegment]
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for DomainName
impl Clone for DomainName
source§fn clone(&self) -> DomainName
fn clone(&self) -> DomainName
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 DomainName
impl Debug for DomainName
source§impl Default for DomainName
impl Default for DomainName
source§impl<'de> Deserialize<'de> for DomainName
impl<'de> Deserialize<'de> for DomainName
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 Display for DomainName
impl Display for DomainName
source§impl From<FullyQualifiedDomainName> for DomainName
impl From<FullyQualifiedDomainName> for DomainName
source§fn from(value: FullyQualifiedDomainName) -> Self
fn from(value: FullyQualifiedDomainName) -> Self
Converts to this type from the input type.
source§impl From<PartiallyQualifiedDomainName> for DomainName
impl From<PartiallyQualifiedDomainName> for DomainName
source§fn from(value: PartiallyQualifiedDomainName) -> Self
fn from(value: PartiallyQualifiedDomainName) -> Self
Converts to this type from the input type.
source§impl Hash for DomainName
impl Hash for DomainName
source§impl JsonSchema for DomainName
impl JsonSchema for DomainName
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 DomainName
impl Ord for DomainName
source§fn cmp(&self, other: &DomainName) -> Ordering
fn cmp(&self, other: &DomainName) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<FullyQualifiedDomainName> for DomainName
impl PartialEq<FullyQualifiedDomainName> for DomainName
source§fn eq(&self, other: &FullyQualifiedDomainName) -> bool
fn eq(&self, other: &FullyQualifiedDomainName) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq<PartiallyQualifiedDomainName> for DomainName
impl PartialEq<PartiallyQualifiedDomainName> for DomainName
source§fn eq(&self, other: &PartiallyQualifiedDomainName) -> bool
fn eq(&self, other: &PartiallyQualifiedDomainName) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialEq for DomainName
impl PartialEq for DomainName
source§fn eq(&self, other: &DomainName) -> bool
fn eq(&self, other: &DomainName) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for DomainName
impl PartialOrd for DomainName
source§fn partial_cmp(&self, other: &DomainName) -> Option<Ordering>
fn partial_cmp(&self, other: &DomainName) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for DomainName
impl Serialize for DomainName
source§impl TryFrom<&str> for DomainName
impl TryFrom<&str> for DomainName
source§impl TryFrom<String> for DomainName
impl TryFrom<String> for DomainName
impl Eq for DomainName
impl StructuralPartialEq for DomainName
Auto Trait Implementations§
impl Freeze for DomainName
impl RefUnwindSafe for DomainName
impl Send for DomainName
impl Sync for DomainName
impl Unpin for DomainName
impl UnwindSafe for DomainName
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)