Struct hdk::hash_path::path::Component [−][src]
#[repr(transparent)]pub struct Component(_);
Expand description
Each path component is arbitrary bytes to be hashed together in a predictable way when the path is hashed to create something that can be linked and discovered by all DHT participants.
Trait Implementations
Access bytes.
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
Alias From<&str>
Build a component from a String.
For many simple use cases we can construct a path out of a string similar to a URI. We represent this using the utf32 bytes rather than the utf8 bytes for the chars in the string which gives us a fixed width encoding for strings, which gives us a clean/easy way to support sharding based on strings by iterating over u32s rather than deciding what to do with variable width u8 or u16 characters.
Unwrap bytes.
Alias From<&str>
Wrap bytes.
Auto Trait Implementations
impl RefUnwindSafe for Component
impl UnwindSafe for Component
Blanket Implementations
Mutably borrows from an owned value. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;