Struct bip_utracker::scrape::ScrapeResponse [] [src]

pub struct ScrapeResponse<'a> {
    // some fields omitted
}

Scrape response sent from the server to the client.

Methods

impl<'a> ScrapeResponse<'a>
[src]

fn new() -> ScrapeResponse<'a>

Create a new ScrapeResponse.

fn from_bytes(bytes: &'a [u8]) -> IResult<&'a [u8]ScrapeResponse<'a>>

Construct a ScrapeResponse from the given bytes.

fn write_bytes<W>(&self, writer: W) -> Result<()> where W: Write

Write the ScrapeResponse to the given writer.

Ordering of the written stats is identical to that of ScrapeResponse::iter().

fn insert(&mut self, stats: ScrapeStats)

Add the scrape statistics to the current response.

fn iter<'b>(&'b self) -> ScrapeResponseIter<'b>

Iterator over each status for every InfoHash in the request.

Ordering of the status corresponds to the ordering of the InfoHash in the initial request.

fn to_owned(&self) -> ScrapeResponse<'static>

Create an owned version of ScrapeResponse.

Trait Implementations

impl<'a> Eq for ScrapeResponse<'a>
[src]

impl<'a> PartialEq for ScrapeResponse<'a>
[src]

fn eq(&self, __arg_0: &ScrapeResponse<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &ScrapeResponse<'a>) -> bool

This method tests for !=.

impl<'a> Debug for ScrapeResponse<'a>
[src]

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

Formats the value using the given formatter.

impl<'a> Clone for ScrapeResponse<'a>
[src]

fn clone(&self) -> ScrapeResponse<'a>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more