Struct bip_utracker::announce::AnnounceResponse [] [src]

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

Announce response sent from the server to the client.

Methods

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

fn new(interval: i32, leechers: i32, seeders: i32, peers: CompactPeers<'a>) -> AnnounceResponse<'a>

Create a new AnnounceResponse

fn from_bytes_v4(bytes: &'a [u8]) -> IResult<&'a [u8]AnnounceResponse<'a>>

Construct an IPv4 AnnounceResponse from the given bytes.

fn from_bytes_v6(bytes: &'a [u8]) -> IResult<&'a [u8]AnnounceResponse<'a>>

Construct an IPv6 AnnounceResponse from the given bytes.

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

Write the AnnounceResponse to the given writer.

fn interval(&self) -> i32

Interval in seconds that clients should wait before re-announcing.

fn leechers(&self) -> i32

Number of leechers the tracker knows about for the torrent.

fn seeders(&self) -> i32

Number of seeders the tracker knows about for the torrent.

fn peers(&self) -> &CompactPeers<'a>

Peers the tracker knows about that are sharing the torrent.

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

Create an owned version of AnnounceResponse.

Trait Implementations

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

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

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

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

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

This method tests for !=.

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

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

Formats the value using the given formatter.

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

fn clone(&self) -> AnnounceResponse<'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