pub struct InfoHashes {
pub v1: Option<Id20>,
pub v2: Option<Id32>,
}Expand description
Holds optional v1 (SHA-1) and v2 (SHA-256) info hashes.
At least one hash must be present. Used throughout the stack as the canonical way to identify a torrent regardless of protocol version.
Fields§
§v1: Option<Id20>v1 info hash (SHA-1 of the v1 info dict).
v2: Option<Id32>v2 info hash (SHA-256 of the v2 info dict).
Implementations§
Source§impl InfoHashes
impl InfoHashes
Trait Implementations§
Source§impl Clone for InfoHashes
impl Clone for InfoHashes
Source§fn clone(&self) -> InfoHashes
fn clone(&self) -> InfoHashes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InfoHashes
impl Debug for InfoHashes
Source§impl Display for InfoHashes
impl Display for InfoHashes
Source§impl Hash for InfoHashes
impl Hash for InfoHashes
Source§impl PartialEq for InfoHashes
impl PartialEq for InfoHashes
Source§fn eq(&self, other: &InfoHashes) -> bool
fn eq(&self, other: &InfoHashes) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InfoHashes
impl Serialize for InfoHashes
impl Eq for InfoHashes
impl StructuralPartialEq for InfoHashes
Auto Trait Implementations§
impl Freeze for InfoHashes
impl RefUnwindSafe for InfoHashes
impl Send for InfoHashes
impl Sync for InfoHashes
impl Unpin for InfoHashes
impl UnsafeUnpin for InfoHashes
impl UnwindSafe for InfoHashes
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