pub struct ComponentId(/* private fields */);Expand description
Stable, fixed-width identity for a component and its durable namespace.
Implementations§
Source§impl ComponentId
impl ComponentId
Sourcepub fn derive(publisher_namespace: &str, component_name: &str) -> ComponentId
pub fn derive(publisher_namespace: &str, component_name: &str) -> ComponentId
Derives an identity from exact publisher/namespace and component name text.
Sourcepub fn parse_hex(value: &str) -> Result<ComponentId, ComponentIdParseError>
pub fn parse_hex(value: &str) -> Result<ComponentId, ComponentIdParseError>
Parses exactly 64 hexadecimal characters into a component identity.
§Errors
Returns a typed parse error for the wrong width or a non-hexadecimal byte.
Trait Implementations§
Source§impl Clone for ComponentId
impl Clone for ComponentId
Source§fn clone(&self) -> ComponentId
fn clone(&self) -> ComponentId
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 moreimpl Copy for ComponentId
Source§impl Debug for ComponentId
impl Debug for ComponentId
Source§impl<'de> Deserialize<'de> for ComponentId
impl<'de> Deserialize<'de> for ComponentId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComponentId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComponentId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ComponentId
impl Display for ComponentId
impl Eq for ComponentId
Source§impl FromStr for ComponentId
impl FromStr for ComponentId
Source§type Err = ComponentIdParseError
type Err = ComponentIdParseError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<ComponentId, <ComponentId as FromStr>::Err>
fn from_str(value: &str) -> Result<ComponentId, <ComponentId as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for ComponentId
impl Hash for ComponentId
Source§impl Ord for ComponentId
impl Ord for ComponentId
Source§fn cmp(&self, other: &ComponentId) -> Ordering
fn cmp(&self, other: &ComponentId) -> 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
Source§impl PartialEq for ComponentId
impl PartialEq for ComponentId
Source§impl PartialOrd for ComponentId
impl PartialOrd for ComponentId
Source§impl Serialize for ComponentId
impl Serialize for ComponentId
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 ComponentId
Source§impl TryFrom<String> for ComponentId
impl TryFrom<String> for ComponentId
Source§type Error = ComponentIdParseError
type Error = ComponentIdParseError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<ComponentId, <ComponentId as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<ComponentId, <ComponentId as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ComponentId
impl RefUnwindSafe for ComponentId
impl Send for ComponentId
impl Sync for ComponentId
impl Unpin for ComponentId
impl UnsafeUnpin for ComponentId
impl UnwindSafe for ComponentId
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.