pub struct ShardBody(/* private fields */);Expand description
Decompressed shard body for manifest-driven file access.
Use with ManifestEntry offsets instead of parsing shard-internal metadata.
Created via DecryptedShard::decompress().
Implementations§
Source§impl ShardBody
impl ShardBody
Sourcepub fn read_file(&self, entry: &ManifestEntry) -> Result<FileContent>
pub fn read_file(&self, entry: &ManifestEntry) -> Result<FileContent>
Read a file using its manifest entry.
Extracts the file content at the offset and length specified by the entry.
Auto Trait Implementations§
impl Freeze for ShardBody
impl RefUnwindSafe for ShardBody
impl Send for ShardBody
impl Sync for ShardBody
impl Unpin for ShardBody
impl UnsafeUnpin for ShardBody
impl UnwindSafe for ShardBody
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> 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