[][src]Trait addr_hal::SocketAddressV6

pub trait SocketAddressV6: Clone + Copy {
    type IpAddress: Ipv6Address;
    fn new(
        ip: Ipv6Addr<Self::IpAddress>,
        port: u16,
        flowinfo: u32,
        scope_id: u32
    ) -> Self;
fn ip(&self) -> &Ipv6Addr<Self::IpAddress>;
fn set_ip(&mut self, ip: Ipv6Addr<Self::IpAddress>);
fn port(&self) -> u16;
fn set_port(&mut self, port: u16);
fn set_flowinfo(&mut self, new_flowinfo: u32);
fn flowinfo(&self) -> u32;
fn set_scope_id(&mut self, new_scope_id: u32);
fn scope_id(&self) -> u32; }

Describe the internal data structure behavior of SocketAddrV6.

You can implement this trait by yourself or use ffi for specific Platform.

Associated Types

type IpAddress: Ipv6Address

Ipv6Address inner type.

Loading content...

Required methods

fn new(
    ip: Ipv6Addr<Self::IpAddress>,
    port: u16,
    flowinfo: u32,
    scope_id: u32
) -> Self

Creates a new IPv6 socket address from ip address and port

The result will represent the Socket address ip:port.

fn ip(&self) -> &Ipv6Addr<Self::IpAddress>

Got ip address.

fn set_ip(&mut self, ip: Ipv6Addr<Self::IpAddress>)

Set ip address.

fn port(&self) -> u16

Got port.

fn set_port(&mut self, port: u16)

Set port.

fn set_flowinfo(&mut self, new_flowinfo: u32)

Set flowinfo.

fn flowinfo(&self) -> u32

Got flowinfo.

fn set_scope_id(&mut self, new_scope_id: u32)

Set scope id.

fn scope_id(&self) -> u32

Got scope id.

Loading content...

Implementors

Loading content...