Enum IpAddr

pub enum IpAddr

no_std implementation of std::net::IpAddr.

Note: because we intend to replace this type with core::net::IpAddr as soon as it is stabilized, the identity of this type should not be considered semver-stable. However, the attached interfaces are stable; they form a subset of those provided by core::net::IpAddr.

Variants

V4(Ipv4Addr)

An Ipv4 address.

V6(Ipv6Addr)

An Ipv6 address.

Trait Implementations

impl Clone for IpAddr

fn clone(&self) -> Self

impl Copy for IpAddr

impl Debug for IpAddr

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for IpAddr

impl From<IpAddr> for IpAddr

fn from(addr: IpAddr) -> Self

impl From<Ipv4Addr> for IpAddr

fn from(v4: Ipv4Addr) -> Self

impl From<Ipv6Addr> for IpAddr

fn from(v6: Ipv6Addr) -> Self

impl Hash for IpAddr

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for IpAddr

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for IpAddr

impl TryFrom<&str> for IpAddr

type Error = AddrParseError;
fn try_from(value: &str) -> Result<Self, Self::Error>

Auto Trait Implementations

impl Freeze for IpAddr

impl RefUnwindSafe for IpAddr

impl Send for IpAddr

impl Sync for IpAddr

impl Unpin for IpAddr

impl UnsafeUnpin for IpAddr

impl UnwindSafe for IpAddr

Blanket Implementations

impl<T> Any for IpAddr where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for IpAddr where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for IpAddr where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for IpAddr where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for IpAddr

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for IpAddr where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for IpAddr where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for IpAddr where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for IpAddr where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>