pub enum TorrentError {
Bencode(String),
InvalidTorrent(&'static str),
InvalidMagnet(&'static str),
Srt(String),
Io(Error),
Discovery(String),
PieceHashMismatch(u32),
InfoHash(&'static str),
UrlEncoding(String),
}Expand description
Errors that can occur in rift-torrent operations.
Variants§
Bencode(String)
Bencode parsing/encoding errors.
InvalidTorrent(&'static str)
Invalid .torrent file structure.
InvalidMagnet(&'static str)
Magnet URI parsing errors.
Srt(String)
SRT parsing or derivation errors.
Io(Error)
I/O errors (file operations).
Discovery(String)
Peer discovery failed.
PieceHashMismatch(u32)
Piece verification failed.
InfoHash(&'static str)
Infohash derivation error.
UrlEncoding(String)
URL encoding/decoding error.
Trait Implementations§
Source§impl Debug for TorrentError
impl Debug for TorrentError
Source§impl Display for TorrentError
impl Display for TorrentError
Source§impl Error for TorrentError
impl Error for TorrentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for TorrentError
impl From<Error> for TorrentError
Source§impl From<FromHexError> for TorrentError
impl From<FromHexError> for TorrentError
Source§fn from(_: FromHexError) -> Self
fn from(_: FromHexError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TorrentError
impl !RefUnwindSafe for TorrentError
impl Send for TorrentError
impl Sync for TorrentError
impl Unpin for TorrentError
impl !UnwindSafe for TorrentError
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