[][src]Enum torro::error::TorroError

#[non_exhaustive]pub enum TorroError {
    BencodeError(BencodeError),
    TorrentCreationError(TorrentCreationError),
    BadFileRead(PathBuf),
    BadFileWrite(PathBuf),
    Unimplemented,
}

Main error enum containing multiple module-specific errors like BencodeError for .torrent (bencode) parsing

All module-specific errors have a From trait implemented by default for this TorroError and are required to have at least the Debug derive added

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BencodeError(BencodeError)

An error relating to the crate::bencode module

TorrentCreationError(TorrentCreationError)

An error relating to the creation of Torrent's (from Torrent::new or Torrent::from_file)

BadFileRead(PathBuf)

When an attemped file read failed, typically happens with Torrent::from_file. See TorroError::BadFileWrite for errors related to file writes

BadFileWrite(PathBuf)

A bad file write occured, typically happens when trying to safe a result of a download without corrent write permissions. See TorroError::BadFileRead for errors related to file reads

Unimplemented

Indicates that a call has reached an unimplemented section of the library, used for placeholder returns instead of the less graceful unimplemented!() macro

Trait Implementations

impl Clone for TorroError[src]

impl Debug for TorroError[src]

impl From<BencodeError> for TorroError[src]

impl From<TorrentCreationError> for TorroError[src]

impl PartialEq<TorroError> for TorroError[src]

impl StructuralPartialEq for TorroError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.