pub struct Type2Blob {
pub header: DeliveryBlobHeader,
pub payload_length: usize,
pub is_compressed: bool,
}Expand description
Header + metadata fields of a Type 2 blob.
WARNING: Outside of storage-owned components, this should only be used for informational or debugging purposes. The contents of this struct should be considered internal implementation details and are subject to change at any time.
Fields§
§header: DeliveryBlobHeader§payload_length: usize§is_compressed: boolImplementations§
Source§impl Type2Blob
impl Type2Blob
pub const HEADER: DeliveryBlobHeader
pub const CHUNKED_ARCHIVE_OPTIONS: ChunkedArchiveOptions
Sourcepub fn generate(data: &[u8], mode: CompressionMode) -> Vec<u8> ⓘ
pub fn generate(data: &[u8], mode: CompressionMode) -> Vec<u8> ⓘ
Generate a Type 2 delivery blob for data using the specified mode.
Sourcepub fn generate_to(
data: &[u8],
mode: CompressionMode,
writer: impl Write,
) -> Result<(), Error>
pub fn generate_to( data: &[u8], mode: CompressionMode, writer: impl Write, ) -> Result<(), Error>
Generate a Type 2 delivery blob for data using the specified mode. Writes delivery blob
directly into writer.
Trait Implementations§
impl Copy for Type2Blob
impl Eq for Type2Blob
Source§impl From<DeliveryBlob> for Type2Blob
impl From<DeliveryBlob> for Type2Blob
Source§fn from(blob: DeliveryBlob) -> Self
fn from(blob: DeliveryBlob) -> Self
Converts to this type from the input type.
Source§impl From<Type2Blob> for DeliveryBlob
impl From<Type2Blob> for DeliveryBlob
impl StructuralPartialEq for Type2Blob
Auto Trait Implementations§
impl Freeze for Type2Blob
impl RefUnwindSafe for Type2Blob
impl Send for Type2Blob
impl Sync for Type2Blob
impl Unpin for Type2Blob
impl UnsafeUnpin for Type2Blob
impl UnwindSafe for Type2Blob
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