pub struct Link(/* private fields */);Expand description
TODO (amiller68): revisit a better way to serialize this
Implementations§
Trait Implementations§
Source§impl Default for Link
§Links
A Link is a reference to a block of data stored
by the iroh-blobs protocol.
Links are implemented as Blake3 only multihashes
which are interprettable as both CIDs and iroh_blobs::HashAndFormat
CIDs encoding is used to communicate the expected encoding of
the referenced content, while HashAndFormat is used for the
retrieval of data over the iroh_blobs protocol.
For our purposes, we keep the following assumptions:
impl Default for Link
§Links
A Link is a reference to a block of data stored by the iroh-blobs protocol. Links are implemented as Blake3 only multihashes which are interprettable as both CIDs and iroh_blobs::HashAndFormat CIDs encoding is used to communicate the expected encoding of the referenced content, while HashAndFormat is used for the retrieval of data over the iroh_blobs protocol. For our purposes, we keep the following assumptions:
- hashes are always blake3, and usually generated by iroh-blobs
- blob formats may be Raw or HashSeq. Most of our links will be Raw, we only use HashSeq for declaring a Bucket’s pinset
- links may either be RAW or DAG-CBOR encoded depending on whether they
point to:
- public raw data (RAW)
- private raw data (RAW)
- private structured data (RAW, but underlying format is DAG-CBOR)
- public structured data (DAG-CBOR)
Source§impl<'de> Deserialize<'de> for Link
impl<'de> Deserialize<'de> for Link
Source§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
Source§impl From<Link> for HashAndFormat
impl From<Link> for HashAndFormat
Source§impl From<Link> for LinkedData
impl From<Link> for LinkedData
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
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> 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.