Struct rustful::server::Host [] [src]

pub struct Host(_);

A host address and a port.

Can be conveniently converted from an existing address-port pair or just a port:

use std::net::Ipv4Addr;
use rustful::server::Host;

let host1: Host = (Ipv4Addr::new(0, 0, 0, 0), 80).into();
let host2: Host = 80.into();

assert_eq!(host1, host2);

Methods

impl Host
[src]

Create a Host with the address 0.0.0.0:port. This is the same as port.into().

Change the port of the host address.

Trait Implementations

impl Eq for Host
[src]

impl PartialEq for Host
[src]

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

This method tests for !=.

impl Debug for Host
[src]

Formats the value using the given formatter. Read more

impl Hash for Host
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for Host
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Host
[src]

impl From<Host> for SocketAddr
[src]

Performs the conversion.

impl From<u16> for Host
[src]

Performs the conversion.

impl From<SocketAddr> for Host
[src]

Performs the conversion.

impl From<SocketAddrV4> for Host
[src]

Performs the conversion.

impl From<SocketAddrV6> for Host
[src]

Performs the conversion.

impl From<(Ipv4Addr, u16)> for Host
[src]

Performs the conversion.

impl FromStr for Host
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Host

impl Sync for Host