pub struct PieceMetadata {
pub number: u32,
pub offset: u64,
pub length: u64,
pub digest: String,
pub parent_id: String,
pub traffic_type: u8,
pub cost: Duration,
pub created_at: NaiveDateTime,
}Expand description
PieceMetadata holds the metadata information for a piece.
Fields§
§number: u32§offset: u64§length: u64§digest: String§parent_id: String§traffic_type: u8§cost: Duration§created_at: NaiveDateTimeImplementations§
Trait Implementations§
Source§impl Clone for PieceMetadata
impl Clone for PieceMetadata
Source§fn clone(&self) -> PieceMetadata
fn clone(&self) -> PieceMetadata
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 PieceMetadata
impl Debug for PieceMetadata
Source§impl From<PieceMetadata> for (Bytes, u32)
Implement From for Bytes for conversion to a byte slice.
impl From<PieceMetadata> for (Bytes, u32)
Implement From
Auto Trait Implementations§
impl Freeze for PieceMetadata
impl RefUnwindSafe for PieceMetadata
impl Send for PieceMetadata
impl Sync for PieceMetadata
impl Unpin for PieceMetadata
impl UnwindSafe for PieceMetadata
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