pub enum Error {
Show 30 variants
Wire(Error),
Storage(Error),
Tracker(Error),
Dht(Error),
Core(Error),
Connection(String),
MetadataHashMismatch,
PieceHashFailed {
index: u32,
},
InvalidPeerData(String),
TorrentNotFound(Id20),
DuplicateTorrent(Id20),
SessionAtCapacity(usize),
MetadataNotReady(Id20),
InvalidFileIndex {
index: usize,
count: usize,
},
FileSkipped {
index: usize,
},
InvalidPieceIndex {
index: u32,
num_pieces: u32,
},
Config(String),
InvalidSettings(String),
Shutdown,
DhtDisabled,
PeerReadTimeout(u64),
PeerDataTimeout(u64),
PeerWriteTimeout(u64),
PeerBackpressureOverflow(&'static str),
I2p(SamError),
Io(Error),
CategoryNotFound(String),
TorrentBeingRemoved(Id20),
CategoryRegistry(String),
ConcurrentReconfig,
}Expand description
Errors that can occur during session operations.
Variants§
Wire(Error)
Wire protocol error from the peer connection layer.
Storage(Error)
Storage/disk I/O error.
Tracker(Error)
Tracker communication error.
Dht(Error)
DHT operation error.
Core(Error)
Core library error (metainfo parsing, hashing, etc.).
Connection(String)
Peer connection failed.
MetadataHashMismatch
Received metadata whose info hash does not match the expected value.
PieceHashFailed
A piece failed hash verification.
InvalidPeerData(String)
Received invalid peer data from a tracker or PEX message.
TorrentNotFound(Id20)
The requested torrent is not in the session.
DuplicateTorrent(Id20)
Attempted to add a torrent that already exists in the session.
SessionAtCapacity(usize)
The session has reached its maximum torrent capacity.
MetadataNotReady(Id20)
Torrent metadata has not been received yet (magnet link still resolving).
InvalidFileIndex
File index is out of range for the torrent.
FileSkipped
Attempted to stream a file that has Skip priority.
InvalidPieceIndex
Piece index is out of range for the torrent.
Config(String)
Configuration error (e.g. invalid proxy settings).
InvalidSettings(String)
Settings validation failed.
Shutdown
The session is shutting down and cannot accept new commands.
DhtDisabled
DHT is disabled in session settings.
PeerReadTimeout(u64)
Peer read timeout — no wire message received within the configured duration.
PeerDataTimeout(u64)
Peer data contribution timeout — no Piece message received within the configured duration.
PeerWriteTimeout(u64)
Peer write timeout — outgoing message could not be sent within the configured duration.
PeerBackpressureOverflow(&'static str)
M182: per-channel backpressure queue exceeded its cap. Treated
as a soft stall — the downstream consumer (requester or
TorrentActor) is too slow and the wire reader would otherwise
stall TCP for all peers on this connection. See M182 audit
docs/investigations/2026-05-02-m182-stall-audit/INVESTIGATION.md.
I2p(SamError)
I2P SAM protocol error.
Io(Error)
Operating system I/O error.
CategoryNotFound(String)
M170: caller specified a category that is not in the registry. The qBt API maps this to 409 Conflict.
TorrentBeingRemoved(Id20)
M170: an add arrived while the same info hash is still being
removed by a deleteFiles=true delete. Caller should retry
shortly. Mapped to 409 Conflict by the qBt API.
CategoryRegistry(String)
M170: category registry persistence error.
ConcurrentReconfig
M173 Lane B (B11): a concurrent apply_settings call won the
in-flight guard; this caller must retry shortly. The qBt v2
setPreferences handler maps this to HTTP 409 Conflict.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.