pub struct DownloadPiece { /* private fields */ }Expand description
DownloadPiece represents a download piece request.
Value Format:
- Task ID (64 bytes): SHA-256 hash of the task ID.
- Piece Number (4 bytes): Piece number to download.
-----------------------------------------------
| Task ID (64 bytes) | Piece Number (4 bytes) |
-----------------------------------------------Implementations§
Source§impl DownloadPiece
DownloadPiece implements the DownloadPiece functions.
impl DownloadPiece
DownloadPiece implements the DownloadPiece functions.
Trait Implementations§
Source§impl Clone for DownloadPiece
impl Clone for DownloadPiece
Source§fn clone(&self) -> DownloadPiece
fn clone(&self) -> DownloadPiece
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DownloadPiece
impl Debug for DownloadPiece
Source§impl From<DownloadPiece> for Bytes
Implement From for Bytes for conversion to a byte slice.
impl From<DownloadPiece> for Bytes
Implement From
Source§fn from(piece: DownloadPiece) -> Self
fn from(piece: DownloadPiece) -> Self
from converts the download piece request to a byte slice.
Source§impl TryFrom<Bytes> for DownloadPiece
Implement TryFrom for DownloadPiece for conversion from a byte slice.
impl TryFrom<Bytes> for DownloadPiece
Implement TryFrom
Auto Trait Implementations§
impl Freeze for DownloadPiece
impl RefUnwindSafe for DownloadPiece
impl Send for DownloadPiece
impl Sync for DownloadPiece
impl Unpin for DownloadPiece
impl UnwindSafe for DownloadPiece
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