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