pub struct CreateResult { /* private fields */ }Expand description
Canonical creation result.
Implementations§
Source§impl CreateResult
impl CreateResult
Sourcepub const fn mode(&self) -> CreateMode
pub const fn mode(&self) -> CreateMode
Returns the created protocol representation.
Sourcepub const fn info_hash_v1(&self) -> Option<InfoHashV1>
pub const fn info_hash_v1(&self) -> Option<InfoHashV1>
Returns the SHA-1 hash for v1 or hybrid output.
Sourcepub const fn info_hash_v2(&self) -> Option<InfoHashV2>
pub const fn info_hash_v2(&self) -> Option<InfoHashV2>
Returns the SHA-256 hash for v2 or hybrid output.
Sourcepub const fn file_count(&self) -> usize
pub const fn file_count(&self) -> usize
Returns payload file count.
Sourcepub const fn payload_bytes(&self) -> u64
pub const fn payload_bytes(&self) -> u64
Returns total payload bytes.
Sourcepub const fn piece_count(&self) -> usize
pub const fn piece_count(&self) -> usize
Returns v1 piece count.
Sourcepub const fn piece_length(&self) -> u64
pub const fn piece_length(&self) -> u64
Returns selected piece length.
Sourcepub const fn piece_length_policy(&self) -> Option<&'static str>
pub const fn piece_length_policy(&self) -> Option<&'static str>
Returns the automatic policy identifier, or None for explicit length.
Sourcepub const fn metrics(&self) -> CreateMetrics
pub const fn metrics(&self) -> CreateMetrics
Returns phase metrics.
Trait Implementations§
Source§impl Clone for CreateResult
impl Clone for CreateResult
Source§fn clone(&self) -> CreateResult
fn clone(&self) -> CreateResult
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 moreAuto Trait Implementations§
impl Freeze for CreateResult
impl RefUnwindSafe for CreateResult
impl Send for CreateResult
impl Sync for CreateResult
impl Unpin for CreateResult
impl UnwindSafe for CreateResult
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