pub struct MainPacket {
pub recovery_set_id: RecoverySetId,
pub slice_size: u64,
pub recovery_file_ids: Vec<FileId>,
pub non_recovery_file_ids: Vec<FileId>,
}Expand description
Parsed Main packet.
Contains the slice size and lists of file IDs for recovery and non-recovery files. The recovery_set_id from the header equals the MD5 of this packet’s body.
Fields§
§recovery_set_id: RecoverySetIdThe recovery set ID (from the packet header).
slice_size: u64Block/slice size in bytes.
recovery_file_ids: Vec<FileId>File IDs of files in the recovery set.
non_recovery_file_ids: Vec<FileId>File IDs of files NOT in the recovery set.
Implementations§
Source§impl MainPacket
impl MainPacket
Sourcepub fn parse(body: &[u8], recovery_set_id: RecoverySetId) -> Result<Self>
pub fn parse(body: &[u8], recovery_set_id: RecoverySetId) -> Result<Self>
Parse a Main packet from its body bytes (everything after the 64-byte header).
Trait Implementations§
Source§impl Clone for MainPacket
impl Clone for MainPacket
Source§fn clone(&self) -> MainPacket
fn clone(&self) -> MainPacket
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 moreAuto Trait Implementations§
impl Freeze for MainPacket
impl RefUnwindSafe for MainPacket
impl Send for MainPacket
impl Sync for MainPacket
impl Unpin for MainPacket
impl UnsafeUnpin for MainPacket
impl UnwindSafe for MainPacket
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> 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