Enum rd_interface::Address [−][src]
Address can be IPv4, IPv6 address or a domain with port.
Variants
IPv4(SocketAddrV4)
IPv6(SocketAddrV6)
Implementations
impl Address
[src]
pub fn to_socket_addr(self) -> Result<SocketAddr>
[src]
Converts to SocketAddr if Address can be convert to. Otherwise AddrNotAvailable is returned.
pub async fn resolve<Fut>(
&self,
f: impl FnOnce(String, u16) -> Fut
) -> Result<SocketAddr> where
Fut: Future<Output = Result<SocketAddr>>,
[src]
&self,
f: impl FnOnce(String, u16) -> Fut
) -> Result<SocketAddr> where
Fut: Future<Output = Result<SocketAddr>>,
Resolve domain to SocketAddr using f
.
Trait Implementations
impl Clone for Address
[src]
impl Debug for Address
[src]
impl Display for Address
[src]
impl From<SocketAddr> for Address
[src]
fn from(addr: SocketAddr) -> Self
[src]
impl IntoAddress for Address
[src]
fn into_address(self) -> Result<Address>
[src]
fn into_socket_addr(self) -> Result<SocketAddr> where
Self: Sized,
[src]
Self: Sized,
impl PartialEq<Address> for Address
[src]
impl StructuralPartialEq for Address
[src]
Auto Trait Implementations
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,