pub struct Link<T: ?Sized> { /* private fields */ }Expand description
Implementations§
Source§impl<T: ?Sized> Link<T>
impl<T: ?Sized> Link<T>
Sourcepub const fn new(cid: Cid) -> Self
pub const fn new(cid: Cid) -> Self
Construct from a raw CID.
No runtime validation is performed - the caller is responsible for
ensuring the CID actually addresses a T. To validate, read the
content via the object store and decode into T.
Trait Implementations§
Source§impl<'de, T: ?Sized> Deserialize<'de> for Link<T>
impl<'de, T: ?Sized> Deserialize<'de> for Link<T>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: ?Sized> Ord for Link<T>
impl<T: ?Sized> Ord for Link<T>
Source§impl<T: ?Sized> PartialOrd for Link<T>
impl<T: ?Sized> PartialOrd for Link<T>
impl<T: ?Sized> Eq for Link<T>
Auto Trait Implementations§
impl<T> Freeze for Link<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Link<T>where
T: ?Sized,
impl<T> Send for Link<T>where
T: ?Sized,
impl<T> Sync for Link<T>where
T: ?Sized,
impl<T> Unpin for Link<T>where
T: ?Sized,
impl<T> UnsafeUnpin for Link<T>where
T: ?Sized,
impl<T> UnwindSafe for Link<T>where
T: ?Sized,
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