pub struct DownloadCachePiece { /* private fields */ }Expand description
DownloadCachePiece represents a download cache 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 DownloadCachePiece
DownloadCachePiece implements the DownloadCachePiece functions.
impl DownloadCachePiece
DownloadCachePiece implements the DownloadCachePiece functions.
Trait Implementations§
Source§impl Clone for DownloadCachePiece
impl Clone for DownloadCachePiece
Source§fn clone(&self) -> DownloadCachePiece
fn clone(&self) -> DownloadCachePiece
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 DownloadCachePiece
impl Debug for DownloadCachePiece
Source§impl From<DownloadCachePiece> for Bytes
Implement From for Bytes for conversion to a byte slice.
impl From<DownloadCachePiece> for Bytes
Implement From
Source§fn from(piece: DownloadCachePiece) -> Self
fn from(piece: DownloadCachePiece) -> Self
from converts the download piece request to a byte slice.
Source§impl TryFrom<Bytes> for DownloadCachePiece
Implement TryFrom for DownloadCachePiece for conversion from a byte slice.
impl TryFrom<Bytes> for DownloadCachePiece
Implement TryFrom
Auto Trait Implementations§
impl Freeze for DownloadCachePiece
impl RefUnwindSafe for DownloadCachePiece
impl Send for DownloadCachePiece
impl Sync for DownloadCachePiece
impl Unpin for DownloadCachePiece
impl UnwindSafe for DownloadCachePiece
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