pub enum Control {
Manifest(Vec<FileEntry>),
ResumeState(Vec<ResumeEntry>),
LocalIndex(Vec<LocalFileIndex>),
Start {
streams: u32,
},
FileComplete {
file_id: u32,
hash: Option<[u8; 32]>,
},
AllComplete,
Abort {
reason: String,
},
}Variants§
Manifest(Vec<FileEntry>)
ResumeState(Vec<ResumeEntry>)
LocalIndex(Vec<LocalFileIndex>)
What the receiver already holds, chunk by chunk, for files that exist at the destination.
Sent by the receiver so the sender can recognise a chunk it is about to send as one the far side already has, and say so in 28 bytes instead. Hashing happens on the side that owns the old copy, and the sender compares against hashes it computes anyway for the integrity root — so neither end reads anything twice.
Start
Sender announces how many unidirectional data streams it will open, so the receiver accepts exactly that many and knows when to stop.
FileComplete
Every chunk of file_id has been handed to a data stream. hash is the
Merkle root over the file’s chunk hashes, when verification is enabled.
AllComplete
Abort
Trait Implementations§
impl Eq for Control
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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