Struct bip_utracker::contact::CompactPeersV4
[−]
[src]
pub struct CompactPeersV4<'a> { /* fields omitted */ }
Container for IPv4 peers to be sent/received from a tracker.
Methods
impl<'a> CompactPeersV4<'a>
[src]
fn new() -> CompactPeersV4<'a>
Create a new CompactPeersV4.
fn from_bytes(bytes: &'a [u8]) -> IResult<&'a [u8], CompactPeersV4<'a>>
Construct a CompactPeersV4 from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where
W: Write,
W: Write,
Write the CompactPeersV4 to the given writer.
fn insert(&mut self, peer: SocketAddrV4)
Add the given peer to the list of peers.
fn iter<'b>(&'b self) -> CompactPeersV4Iter<'b>
Iterator over all of the contact information.
fn to_owned(&self) -> CompactPeersV4<'static>
Create an owned version of CompactPeersV4.
Trait Implementations
impl<'a> Clone for CompactPeersV4<'a>
[src]
fn clone(&self) -> CompactPeersV4<'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
impl<'a> Debug for CompactPeersV4<'a>
[src]
impl<'a> PartialEq for CompactPeersV4<'a>
[src]
fn eq(&self, __arg_0: &CompactPeersV4<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CompactPeersV4<'a>) -> bool
This method tests for !=
.