[−][src]Enum torro::torrent::TorrentFile
Represents the overall torrent directory structure for a given Torrent
This merges the BEP0003 spec
of either a single length
for a file given or a list of dictionaries into
this singular enum for easier comprehension
Documentation sourcing
All "BitTorrent Description" headings are taken from
BEP0003 and is subject to
change, like any moving standard. This documentation is based off of version
0e08ddf84d8d3bf101cdf897fc312f2774588c9e
Variants
Single(usize)
A single file with a usize determining it's length in bytes (1
in
usize == 1 byte)
Multiple files with a similar usize to TorrentFile::Single as the first element and a Vec of String subdirectories
BitTorrent Description
length - The length of the file, in bytes.
path - A list of UTF-8 encoded strings corresponding to subdirectory names,
the last of which is the actual file name (a zero length list is an error
case).
Trait Implementations
impl Clone for TorrentFile
[src]
fn clone(&self) -> TorrentFile
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TorrentFile
[src]
impl PartialEq<TorrentFile> for TorrentFile
[src]
fn eq(&self, other: &TorrentFile) -> bool
[src]
fn ne(&self, other: &TorrentFile) -> bool
[src]
impl StructuralPartialEq for TorrentFile
[src]
Auto Trait Implementations
impl RefUnwindSafe for TorrentFile
impl Send for TorrentFile
impl Sync for TorrentFile
impl Unpin for TorrentFile
impl UnwindSafe for TorrentFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,