Enum bip_utracker::announce::SourceIP
[−]
[src]
pub enum SourceIP { ImpliedV4, ExplicitV4(Ipv4Addr), ImpliedV6, ExplicitV6(Ipv6Addr), }
Client specified IP address to send the response to.
Variants
ImpliedV4
Infer the IPv4 address from the sender address.
ExplicitV4(Ipv4Addr)
Send the response to the given IPv4 address.
ImpliedV6
Infer the IPv6 address from the sender address.
ExplicitV6(Ipv6Addr)
Send the response to the given IPv6 address.
Methods
impl SourceIP
[src]
fn from_bytes_v4(bytes: &[u8]) -> IResult<&[u8], SourceIP>
Construct the IPv4 SourceIP from the given bytes.
fn from_bytes_v6(bytes: &[u8]) -> IResult<&[u8], SourceIP>
Construct the IPv6 SourceIP from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where W: Write
Write the SourceIP to the given writer.
fn is_ipv6(&self) -> bool
Whether or not the source is an IPv6 address.
fn is_ipv4(&self) -> bool
Whether or not the source is an IPv4 address.
Trait Implementations
impl Clone for SourceIP
[src]
fn clone(&self) -> SourceIP
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 Copy for SourceIP
[src]
impl Eq for SourceIP
[src]
impl PartialEq for SourceIP
[src]
fn eq(&self, __arg_0: &SourceIP) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SourceIP) -> bool
This method tests for !=
.