TrackerAlert

Enum TrackerAlert 

Source
pub enum TrackerAlert {
    TrackerError(TrackerErrorAlert),
    TrackerWarning(TrackerWarningAlert),
    ScrapeReply(ScrapeReplyAlert),
    ScrapeFailed(ScrapeFailedAlert),
    TrackerReply(TrackerReplyAlert),
    DhtReply(DhtReplyAlert),
    TrackerAnnounce(TrackerAnnounceAlert),
    Trackerid(TrackeridAlert),
}

Variants§

§

TrackerError(TrackerErrorAlert)

This alert is generated on tracker time outs, premature disconnects, invalid response or a HTTP response other than “200 OK”. From the alert you can get the handle to the torrent the tracker belongs to.

§Alert Category

[AlertCategory::Tracker] [AlertCategory::Error]

§Alert Priority

[AlertPriority::High]

§

TrackerWarning(TrackerWarningAlert)

This alert is triggered if the tracker reply contains a warning field. Usually this means that the tracker announce was successful, but the tracker has a message to the client.

§Alert Category

[AlertCategory::Tracker] [AlertCategory::Error]

§Alert Priority

[AlertPriority::Normal]

§

ScrapeReply(ScrapeReplyAlert)

This alert is generated when a scrape request succeeds.

§Alert Category

[AlertCategory::Tracker]

§Alert Priority

[AlertPriority::Critical]

§

ScrapeFailed(ScrapeFailedAlert)

If a scrape request fails, this alert is generated. This might be due to the tracker timing out, refusing connection or returning an http response code indicating an error.

§Alert Category

[AlertCategory::Tracker] [AlertCategory::Error]

§Alert Priority

[AlertPriority::Critical]

§

TrackerReply(TrackerReplyAlert)

This alert is only for informational purpose. It is generated when a tracker announce succeeds. It is generated regardless what kind of tracker was used, be it UDP, HTTP or the DHT.

§Alert Category

[AlertCategory::Tracker]

§Alert Priority

[AlertPriority::Normal]

§

DhtReply(DhtReplyAlert)

This alert is generated each time the DHT receives peers from a node. num_peers is the number of peers we received in this packet. Typically these packets are received from multiple DHT nodes, and so the alerts are typically generated a few at a time.

§Alert Category

[AlertCategory::Dht] [AlertCategory::Tracker]

§Alert Priority

[AlertPriority::Normal]

§

TrackerAnnounce(TrackerAnnounceAlert)

This alert is generated each time a tracker announce is sent (or attempted to be sent). There are no extra data members in this alert. The url can be found in the base class however.

§Alert Category

[AlertCategory::Tracker]

§Alert Priority

[AlertPriority::Normal]

§

Trackerid(TrackeridAlert)

This alert is posted whenever a tracker responds with a trackerid. The tracker ID is like a cookie. libtorrent will store the tracker ID for this tracker and repeat it in subsequent announces.

§Alert Category

[AlertCategory::Status]

§Alert Priority

[AlertPriority::Normal]

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.