pub enum AlertKind {
Show 57 variants
TorrentAdded {
info_hash: Id20,
name: String,
},
TorrentRemoved {
info_hash: Id20,
},
TorrentPaused {
info_hash: Id20,
},
TorrentResumed {
info_hash: Id20,
},
TorrentFinished {
info_hash: Id20,
},
StateChanged {
info_hash: Id20,
prev_state: TorrentState,
new_state: TorrentState,
},
MetadataReceived {
info_hash: Id20,
name: String,
},
MetadataFailed {
info_hash: Id20,
},
TorrentChecked {
info_hash: Id20,
pieces_have: u32,
pieces_total: u32,
},
CheckingProgress {
info_hash: Id20,
progress: f32,
},
PieceFinished {
info_hash: Id20,
piece: u32,
},
BlockFinished {
info_hash: Id20,
piece: u32,
offset: u32,
},
HashFailed {
info_hash: Id20,
piece: u32,
contributors: Vec<IpAddr>,
},
PeerConnected {
info_hash: Id20,
addr: SocketAddr,
},
PeerDisconnected {
info_hash: Id20,
addr: SocketAddr,
reason: Option<String>,
},
PeerBanned {
info_hash: Id20,
addr: SocketAddr,
},
TrackerReply {
info_hash: Id20,
url: String,
num_peers: usize,
},
TrackerWarning {
info_hash: Id20,
url: String,
message: String,
},
TrackerError {
info_hash: Id20,
url: String,
message: String,
},
ScrapeReply {
info_hash: Id20,
url: String,
complete: u32,
incomplete: u32,
downloaded: u32,
},
ScrapeError {
info_hash: Id20,
url: String,
message: String,
},
DhtBootstrapComplete,
DhtGetPeers {
info_hash: Id20,
num_peers: usize,
},
DhtNodeIdViolation {
node_id: Id20,
addr: SocketAddr,
},
DhtSampleInfohashes {
num_samples: usize,
total_estimate: i64,
},
ListenSucceeded {
port: u16,
},
ListenFailed {
port: u16,
message: String,
},
SessionStatsUpdate(SessionStats),
FileRenamed {
info_hash: Id20,
index: usize,
new_path: PathBuf,
},
FileCompleted {
info_hash: Id20,
file_index: usize,
},
StorageMoved {
info_hash: Id20,
new_path: PathBuf,
},
FileError {
info_hash: Id20,
path: PathBuf,
message: String,
},
DiskStatsUpdate(DiskStats),
ResumeDataSaved {
info_hash: Id20,
},
TorrentError {
info_hash: Id20,
message: String,
},
PerformanceWarning {
info_hash: Id20,
message: String,
},
TorrentQueuePositionChanged {
info_hash: Id20,
old_pos: i32,
new_pos: i32,
},
TorrentAutoManaged {
info_hash: Id20,
paused: bool,
},
PeerBlocked {
addr: SocketAddr,
},
PeerTurnover {
info_hash: Id20,
disconnected: usize,
replaced: usize,
},
WebSeedBanned {
info_hash: Id20,
url: String,
},
PortMappingSucceeded {
port: u16,
protocol: String,
},
PortMappingFailed {
port: u16,
message: String,
},
InconsistentHashes {
info_hash: Id20,
piece: u32,
},
DhtPutComplete {
target: Id20,
},
DhtMutablePutComplete {
target: Id20,
seq: i64,
},
DhtGetResult {
target: Id20,
value: Option<Vec<u8>>,
},
DhtMutableGetResult {
target: Id20,
value: Option<Vec<u8>>,
seq: Option<i64>,
public_key: [u8; 32],
},
DhtItemError {
target: Id20,
message: String,
},
HolepunchSucceeded {
info_hash: Id20,
addr: SocketAddr,
},
HolepunchFailed {
info_hash: Id20,
addr: SocketAddr,
error_code: Option<u32>,
message: String,
},
I2pSessionCreated {
b32_address: String,
},
I2pError {
message: String,
},
SslTorrentError {
info_hash: Id20,
message: String,
},
SessionStatsAlert {
values: Vec<i64>,
},
ExternalIpDetected {
ip: IpAddr,
},
SettingsChanged,
}Expand description
The specific event that occurred.
Variants§
TorrentAdded
A torrent was added to the session.
TorrentRemoved
A torrent was removed from the session.
TorrentPaused
A torrent was paused.
TorrentResumed
A torrent was resumed.
TorrentFinished
A torrent finished downloading all pieces.
StateChanged
A torrent changed state.
MetadataReceived
Torrent metadata received via BEP 9 extension protocol.
Fields
MetadataFailed
Metadata download failed for a magnet link torrent.
TorrentChecked
A torrent finished checking (verifying existing data on disk).
Fields
CheckingProgress
Progress update during piece hash checking.
Fields
PieceFinished
A piece passed hash verification and is now complete.
BlockFinished
A block (sub-piece chunk) was received and written.
Fields
HashFailed
A piece failed hash verification.
Fields
PeerConnected
A new peer connection was established.
Fields
addr: SocketAddrSocket address of the connected peer.
PeerDisconnected
A peer disconnected.
Fields
addr: SocketAddrSocket address of the disconnected peer.
PeerBanned
A peer was banned (e.g. for sending corrupt data).
Fields
addr: SocketAddrSocket address of the banned peer.
TrackerReply
A tracker announce completed successfully.
Fields
TrackerWarning
A tracker returned a warning message.
Fields
TrackerError
A tracker announce failed.
Fields
ScrapeReply
A tracker scrape completed successfully.
Fields
ScrapeError
A tracker scrape failed.
Fields
DhtBootstrapComplete
DHT routing table bootstrapping finished.
DhtGetPeers
DHT get_peers query returned peers for a torrent.
DhtNodeIdViolation
BEP 42: A DHT node was rejected because its ID doesn’t match its IP.
Fields
addr: SocketAddrSocket address of the violating node.
DhtSampleInfohashes
BEP 51: sample_infohashes response received from a DHT node.
Fields
ListenSucceeded
The session successfully started listening on a port.
ListenFailed
The session failed to listen on a port.
SessionStatsUpdate(SessionStats)
Periodic session statistics snapshot.
FileRenamed
A file within a torrent was renamed.
Fields
FileCompleted
All pieces belonging to a file have been downloaded and verified.
Fields
StorageMoved
A torrent’s storage was moved to a new directory.
Fields
FileError
A file I/O error occurred.
Fields
DiskStatsUpdate(DiskStats)
Periodic disk I/O statistics snapshot.
ResumeDataSaved
Fast resume data was saved for a torrent.
TorrentError
A torrent encountered a fatal error.
PerformanceWarning
A performance warning was detected (e.g. too many hash failures).
TorrentQueuePositionChanged
Queue position changed (manual move or torrent removal shifted positions).
Fields
TorrentAutoManaged
Torrent was paused or resumed by the auto-manage system.
Fields
PeerBlocked
An incoming connection was blocked by the IP filter.
Fields
addr: SocketAddrSocket address that was blocked.
PeerTurnover
Periodic turnover disconnected underperforming peers and connected replacements.
Fields
WebSeedBanned
A web seed was banned (e.g. for serving corrupt data).
PortMappingSucceeded
A UPnP/NAT-PMP port mapping succeeded.
PortMappingFailed
A UPnP/NAT-PMP port mapping failed.
InconsistentHashes
v1 and v2 hashes disagree on the same piece — the .torrent data is inconsistent.
Fields
DhtPutComplete
An immutable DHT put completed.
DhtMutablePutComplete
A mutable DHT put completed.
Fields
DhtGetResult
Result of a DHT get (immutable). value is None if not found.
Fields
DhtMutableGetResult
Result of a DHT mutable get. value is None if not found.
Fields
DhtItemError
A BEP 44 DHT operation failed.
HolepunchSucceeded
A holepunch connection attempt succeeded.
Fields
addr: SocketAddrSocket address of the peer reached via holepunch.
HolepunchFailed
A holepunch connection attempt failed.
Fields
addr: SocketAddrSocket address of the peer we attempted to reach.
I2pSessionCreated
SAM session successfully created with an ephemeral destination.
I2pError
I2P error (SAM bridge unreachable, tunnel failure, etc.)
SslTorrentError
SSL/TLS error for an SSL torrent (handshake failure, cert validation, etc.).
SessionStatsAlert
Session-level statistics counters snapshot (one value per metric).
Fields
values: Vec<i64>Counter values indexed by MetricKind ordinal.
ExternalIpDetected
An external IP address was detected or updated (e.g. from tracker/NAT/DHT).
SettingsChanged
Session settings were changed via apply_settings().