pub enum TorrentVersion {
V1Only,
V2Only,
Hybrid,
}Expand description
Indicates which BitTorrent protocol version(s) a torrent supports.
Variants§
V1Only
BitTorrent v1 only (BEP 3). SHA-1 piece hashes.
V2Only
BitTorrent v2 only (BEP 52). SHA-256 Merkle per-file trees.
Hybrid
Hybrid v1+v2 (BEP 52). Both hash types in a single info dict.
Implementations§
Trait Implementations§
Source§impl Clone for TorrentVersion
impl Clone for TorrentVersion
Source§fn clone(&self) -> TorrentVersion
fn clone(&self) -> TorrentVersion
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 TorrentVersion
impl Debug for TorrentVersion
Source§impl<'de> Deserialize<'de> for TorrentVersion
impl<'de> Deserialize<'de> for TorrentVersion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for TorrentVersion
impl Hash for TorrentVersion
Source§impl PartialEq for TorrentVersion
impl PartialEq for TorrentVersion
Source§fn eq(&self, other: &TorrentVersion) -> bool
fn eq(&self, other: &TorrentVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TorrentVersion
impl Serialize for TorrentVersion
impl Copy for TorrentVersion
impl Eq for TorrentVersion
impl StructuralPartialEq for TorrentVersion
Auto Trait Implementations§
impl Freeze for TorrentVersion
impl RefUnwindSafe for TorrentVersion
impl Send for TorrentVersion
impl Sync for TorrentVersion
impl Unpin for TorrentVersion
impl UnsafeUnpin for TorrentVersion
impl UnwindSafe for TorrentVersion
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