Struct bip_utracker::announce::AnnounceResponse
[−]
[src]
pub struct AnnounceResponse<'a> { /* 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>
[src]
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>>
[src]
Construct an IPv4 AnnounceResponse from the given bytes.
fn from_bytes_v6(bytes: &'a [u8]) -> IResult<&'a [u8], AnnounceResponse<'a>>
[src]
Construct an IPv6 AnnounceResponse from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where
W: Write,
[src]
W: Write,
Write the AnnounceResponse to the given writer.
fn interval(&self) -> i32
[src]
Interval in seconds that clients should wait before re-announcing.
fn leechers(&self) -> i32
[src]
Number of leechers the tracker knows about for the torrent.
fn seeders(&self) -> i32
[src]
Number of seeders the tracker knows about for the torrent.
fn peers(&self) -> &CompactPeers<'a>
[src]
Peers the tracker knows about that are sharing the torrent.
fn to_owned(&self) -> AnnounceResponse<'static>
[src]
Create an owned version of AnnounceResponse.
Trait Implementations
impl<'a> Clone for AnnounceResponse<'a>
[src]
fn clone(&self) -> AnnounceResponse<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for AnnounceResponse<'a>
[src]
impl<'a> PartialEq for AnnounceResponse<'a>
[src]
fn eq(&self, __arg_0: &AnnounceResponse<'a>) -> bool
[src]
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
[src]
This method tests for !=
.