pub struct SerializedXorbObject {
pub serialized_data: Vec<u8>,
pub hash: MerkleHash,
pub raw_num_bytes: u64,
pub num_chunks: usize,
pub footer_start: Option<u64>,
}Expand description
A convenience struct that holds the raw information for the upload path.
Fields§
§serialized_data: Vec<u8>The serialized data and header; can be uploaded as a blob.
hash: MerkleHashThe xorb hash
raw_num_bytes: u64Number of bytes before compression; to be used for progress reporting.
num_chunks: usizeFor logging
Implementations§
Source§impl SerializedXorbObject
impl SerializedXorbObject
Sourcepub fn from_xorb(
xorb: RawXorbData,
serialize_footer: bool,
) -> Result<Self, CoreError>
pub fn from_xorb( xorb: RawXorbData, serialize_footer: bool, ) -> Result<Self, CoreError>
Builds the xorb from raw xorb data.
The compression scheme is determined by HF_XET_XORB_COMPRESSION_POLICY:
auto-detect (default) or an explicit scheme (none, lz4, bg4-lz4).
Sourcepub fn from_xorb_with_compression(
xorb: RawXorbData,
compression_scheme: CompressionScheme,
serialize_footer: bool,
) -> Result<Self, CoreError>
pub fn from_xorb_with_compression( xorb: RawXorbData, compression_scheme: CompressionScheme, serialize_footer: bool, ) -> Result<Self, CoreError>
Builds the xorb from raw xorb data with an explicit compression scheme override.
Auto Trait Implementations§
impl Freeze for SerializedXorbObject
impl RefUnwindSafe for SerializedXorbObject
impl Send for SerializedXorbObject
impl Sync for SerializedXorbObject
impl Unpin for SerializedXorbObject
impl UnsafeUnpin for SerializedXorbObject
impl UnwindSafe for SerializedXorbObject
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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