pub struct Destination { /* private fields */ }Expand description
A fully specified exact routing key.
Implementations§
Source§impl Destination
impl Destination
Sourcepub const fn new(namespace: Namespace, name: DestinationName) -> Destination
pub const fn new(namespace: Namespace, name: DestinationName) -> Destination
Combines validated components without revalidating them.
Sourcepub const fn name(&self) -> &DestinationName
pub const fn name(&self) -> &DestinationName
Borrows the namespace-local exact-match name.
Sourcepub fn canonical_key(&self) -> Vec<u8> ⓘ
pub fn canonical_key(&self) -> Vec<u8> ⓘ
Collision-unambiguous bytes used by the shard authority hash.
Format: namespace byte length as big-endian u16, namespace bytes, name byte length as big-endian u16, name bytes.
Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
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 Destination
impl Debug for Destination
Source§impl<'de> Deserialize<'de> for Destination
impl<'de> Deserialize<'de> for Destination
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Destination, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Destination, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Destination
impl Display for Destination
impl Eq for Destination
Source§impl FromStr for Destination
impl FromStr for Destination
Source§type Err = DestinationError
type Err = DestinationError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<Destination, <Destination as FromStr>::Err>
fn from_str(value: &str) -> Result<Destination, <Destination as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for Destination
impl Hash for Destination
Source§impl Ord for Destination
impl Ord for Destination
Source§fn cmp(&self, other: &Destination) -> Ordering
fn cmp(&self, other: &Destination) -> 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 Destination
impl PartialEq for Destination
Source§impl PartialOrd for Destination
impl PartialOrd for Destination
Source§impl Serialize for Destination
impl Serialize for Destination
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 Destination
Source§impl TryFrom<String> for Destination
impl TryFrom<String> for Destination
Source§type Error = DestinationError
type Error = DestinationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<Destination, <Destination as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<Destination, <Destination as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Destination
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnsafeUnpin for Destination
impl UnwindSafe for Destination
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