pub struct MetadataReference {
pub metadata_hash: [u8; 32],
pub locators: Vec<LocatorEntry>,
pub inline_metadata: Option<Vec<u8>>,
pub codec: u8,
pub uncompressed_len: u32,
}Expand description
Parsed metadata reference section. The inline_metadata field
always holds uncompressed bytes when present (the parser
decompresses v2 blobs transparently). The codec field records
what was on the wire so callers can re-emit it without
re-compression.
Fields§
§metadata_hash: [u8; 32]§locators: Vec<LocatorEntry>§inline_metadata: Option<Vec<u8>>§codec: u8Codec id used for the inline/external blob on the wire.
0x00 for v1 (always store). For v2, whatever the writer
chose (typically 0x04 Brotli for source-tree metadata).
uncompressed_len: u32Uncompressed byte length of the metadata blob. Equal to
inline_metadata.len() when inline; informative for
external (locator) blobs.
Implementations§
Source§impl MetadataReference
impl MetadataReference
Sourcepub fn is_inlined(&self) -> bool
pub fn is_inlined(&self) -> bool
True iff the metadata blob is inlined in this section. Readers can skip the locator layer when this returns true.
Trait Implementations§
Source§impl Clone for MetadataReference
impl Clone for MetadataReference
Source§fn clone(&self) -> MetadataReference
fn clone(&self) -> MetadataReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataReference
impl Debug for MetadataReference
Source§impl Default for MetadataReference
impl Default for MetadataReference
impl Eq for MetadataReference
Source§impl PartialEq for MetadataReference
impl PartialEq for MetadataReference
impl StructuralPartialEq for MetadataReference
Auto Trait Implementations§
impl Freeze for MetadataReference
impl RefUnwindSafe for MetadataReference
impl Send for MetadataReference
impl Sync for MetadataReference
impl Unpin for MetadataReference
impl UnsafeUnpin for MetadataReference
impl UnwindSafe for MetadataReference
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more