pub struct Hashlink { /* private fields */ }Expand description
A SHA-256 digest as a hashlink names it and digestMultibase writes it:
a multihash, in base58btc.
Implementations§
Source§impl Hashlink
impl Hashlink
Sourcepub fn parse(hashlink: &str) -> Option<Self>
pub fn parse(hashlink: &str) -> Option<Self>
Read a hashlink, hl:zQm…. None when it is not one of a SHA-256
digest, or carries metadata, which gateways do not serve by.
Sourcepub fn from_multibase(multibase: &str) -> Option<Self>
pub fn from_multibase(multibase: &str) -> Option<Self>
Read a digestMultibase, zQm…. None when it is not a SHA-256
multihash in base58btc, the only digest FEP-ef61 allows.
Trait Implementations§
impl Eq for Hashlink
impl StructuralPartialEq for Hashlink
Auto Trait Implementations§
impl Freeze for Hashlink
impl RefUnwindSafe for Hashlink
impl Send for Hashlink
impl Sync for Hashlink
impl Unpin for Hashlink
impl UnsafeUnpin for Hashlink
impl UnwindSafe for Hashlink
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.