Skip to main content

ToTargetAddr

Trait ToTargetAddr 

Source
pub trait ToTargetAddr {
    // Required method
    fn to_target_addr(&self) -> Result<TargetAddr, Error>;
}
Expand description

A trait for objects that can be converted to TargetAddr.

Required Methods§

Source

fn to_target_addr(&self) -> Result<TargetAddr, Error>

Converts the value of self to a TargetAddr.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToTargetAddr for (Ipv4Addr, u16)

Source§

impl ToTargetAddr for (Ipv6Addr, u16)

Source§

impl ToTargetAddr for SocketAddr

Source§

impl ToTargetAddr for SocketAddrV4

Source§

impl ToTargetAddr for SocketAddrV6

Source§

impl<'a> ToTargetAddr for &'a str

Source§

impl<'a> ToTargetAddr for (&'a str, u16)

Implementors§