Struct bip_utracker::announce::ClientState
[−]
[src]
pub struct ClientState { /* fields omitted */ }
Announce state of a client reported to the server.
Methods
impl ClientState
[src]
fn new(
bytes_downloaded: i64,
bytes_left: i64,
bytes_uploaded: i64,
event: AnnounceEvent
) -> ClientState
[src]
bytes_downloaded: i64,
bytes_left: i64,
bytes_uploaded: i64,
event: AnnounceEvent
) -> ClientState
Create a new ClientState.
fn from_bytes(bytes: &[u8]) -> IResult<&[u8], ClientState>
[src]
Construct the ClientState from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where
W: Write,
[src]
W: Write,
Write the ClientState to the given writer.
fn event(&self) -> AnnounceEvent
[src]
Event reported by the client.
fn bytes_left(&self) -> i64
[src]
Bytes left to be downloaded.
fn bytes_uploaded(&self) -> i64
[src]
Bytes already uploaded.
fn bytes_downloaded(&self) -> i64
[src]
Bytes already downloaded.
Trait Implementations
impl Debug for ClientState
[src]
impl PartialEq for ClientState
[src]
fn eq(&self, __arg_0: &ClientState) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ClientState) -> bool
[src]
This method tests for !=
.
impl Eq for ClientState
[src]
impl Copy for ClientState
[src]
impl Clone for ClientState
[src]
fn clone(&self) -> ClientState
[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