pub struct DestinationName(/* private fields */);Expand description
A validated dot-separated destination name within a Namespace.
Each label contains lowercase ASCII letters, digits, and interior hyphens.
Implementations§
Source§impl DestinationName
impl DestinationName
Sourcepub fn new(value: &str) -> Result<DestinationName, DestinationError>
pub fn new(value: &str) -> Result<DestinationName, DestinationError>
Validates the total length and every dot-separated label.
Sourcepub fn is_descendant_of(&self, prefix: &DestinationName) -> bool
pub fn is_descendant_of(&self, prefix: &DestinationName) -> bool
Returns whether this name is below prefix on a whole-label boundary.
The prefix itself is not its descendant.
Trait Implementations§
Source§impl Clone for DestinationName
impl Clone for DestinationName
Source§fn clone(&self) -> DestinationName
fn clone(&self) -> DestinationName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DestinationName
impl Debug for DestinationName
Source§impl<'de> Deserialize<'de> for DestinationName
impl<'de> Deserialize<'de> for DestinationName
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DestinationName, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DestinationName, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DestinationName
impl Display for DestinationName
impl Eq for DestinationName
Source§impl FromStr for DestinationName
impl FromStr for DestinationName
Source§type Err = DestinationError
type Err = DestinationError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<DestinationName, <DestinationName as FromStr>::Err>
fn from_str( value: &str, ) -> Result<DestinationName, <DestinationName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for DestinationName
impl Hash for DestinationName
Source§impl Ord for DestinationName
impl Ord for DestinationName
Source§fn cmp(&self, other: &DestinationName) -> Ordering
fn cmp(&self, other: &DestinationName) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DestinationName
impl PartialEq for DestinationName
Source§impl PartialOrd for DestinationName
impl PartialOrd for DestinationName
Source§impl Serialize for DestinationName
impl Serialize for DestinationName
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DestinationName
Source§impl TryFrom<String> for DestinationName
impl TryFrom<String> for DestinationName
Source§type Error = DestinationError
type Error = DestinationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<DestinationName, <DestinationName as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<DestinationName, <DestinationName as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for DestinationName
impl RefUnwindSafe for DestinationName
impl Send for DestinationName
impl Sync for DestinationName
impl Unpin for DestinationName
impl UnsafeUnpin for DestinationName
impl UnwindSafe for DestinationName
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