pub enum Request {
Record(Root),
Folder(Hash),
FolderBranch {
folder: Hash,
start: u64,
count: u32,
},
FolderName {
folder: Hash,
name: String,
},
File(Hash),
FileBranch {
file: Hash,
start: u64,
count: u32,
},
FileBytes {
file: Hash,
offset: u64,
length: u64,
},
Chunks {
file: Hash,
start: u64,
count: u32,
},
Chunk(Hash),
Have(Hash),
}Expand description
What a receiver asks a peer for.
Variants§
Record(Root)
The record of a root.
Folder(Hash)
All of a folder’s entries.
FolderBranch
count of a folder’s entries, from place start.
FolderName
What is under one name in a folder, or that the name is not there.
File(Hash)
All of a file’s list.
FileBranch
count items of a file’s list, from chunk number start.
FileBytes
The items of a file’s list that hold length bytes from offset.
Chunks
count chunks of a file, from chunk number start.
Chunk(Hash)
One chunk, by its hash.
Have(Hash)
Which chunks of a file the peer holds.
Implementations§
Trait Implementations§
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Forget for Request
impl Freeze for Request
impl Move for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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