Struct ipfs_embed::Head [−]
#[repr(C)]pub struct Head { pub id: StreamId, pub hash: [u8; 32], pub len: u64, // some fields omitted }
Fields
id: StreamId
hash: [u8; 32]
len: u64
Implementations
Trait Implementations
impl AsBytes for Head
impl AsBytes for Head
impl<__D> Deserialize<Head, __D> for <Head as Archive>::Archived where
__D: Fallible + ?Sized,
StreamId: Archive,
<StreamId as Archive>::Archived: Deserialize<StreamId, __D>,
[u8; 32]: Archive,
<[u8; 32] as Archive>::Archived: Deserialize<[u8; 32], __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
impl<__D> Deserialize<Head, __D> for <Head as Archive>::Archived where
__D: Fallible + ?Sized,
StreamId: Archive,
<StreamId as Archive>::Archived: Deserialize<StreamId, __D>,
[u8; 32]: Archive,
<[u8; 32] as Archive>::Archived: Deserialize<[u8; 32], __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
pub fn deserialize(
&self,
deserializer: &mut __D
) -> Result<Head, <__D as Fallible>::Error>
pub fn deserialize(
&self,
deserializer: &mut __D
) -> Result<Head, <__D as Fallible>::Error>
Deserializes using the given deserializer
impl FromBytes for Head
impl FromBytes for Head
pub fn only_derive_is_allowed_to_implement_this_trait() where
Head: Sized,
impl StructuralEq for Head
impl StructuralPartialEq for Head
Auto Trait Implementations
impl RefUnwindSafe for Head
impl UnwindSafe for Head
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike Archive
, it may be unsized. Read more
type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
pub unsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
pub unsafe fn resolve_metadata(
&self,
usize,
<T as ArchiveUnsized>::MetadataResolver,
*mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
Creates the archived version of the metadata for this value at the given position and writes it to the given output. Read more
Mutably borrows from an owned value. Read more
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
impl<T, S> SerializeUnsized<S> for T where
T: Serialize<S>,
S: Serializer + ?Sized,
impl<T, S> SerializeUnsized<S> for T where
T: Serialize<S>,
S: Serializer + ?Sized,
pub fn serialize_unsized(
&self,
serializer: &mut S
) -> Result<usize, <S as Fallible>::Error>
pub fn serialize_unsized(
&self,
serializer: &mut S
) -> Result<usize, <S as Fallible>::Error>
Writes the object and returns the position of the archived type.
pub fn serialize_metadata(&self, &mut S) -> Result<(), <S as Fallible>::Error>
pub fn serialize_metadata(&self, &mut S) -> Result<(), <S as Fallible>::Error>
Serializes the metadata for the given type.
pub fn vzip(self) -> V