Enum bip_utracker::ClientResponse [] [src]

pub enum ClientResponse {
    Announce(AnnounceResponse<'static>),
    Scrape(ScrapeResponse<'static>),
}

Response received by the TrackerClient.

Variants

Announce(AnnounceResponse<'static>)

Announce response.

Scrape(ScrapeResponse<'static>)

Scrape response.

Methods

impl ClientResponse
[src]

fn announce_response(&self) -> Option<&AnnounceResponse<'static>>

Optionally return a reference to the underyling AnnounceResponse.

If you know that the token associated with the response was retrived from an AnnounceRequest, then unwrapping this value is guaranteed to succeed.

fn scrape_response(&self) -> Option<&ScrapeResponse<'static>>

Optionally return a reference to the underyling ScrapeResponse.

If you know that the token associated with the response was retrived from a ScrapeRequest, then unwrapping this value is guaranteed to succeed.

Trait Implementations

impl Debug for ClientResponse
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.