跳到主要内容

Ipv4Addr

搜索

结构体 Ipv4Addr 

Source
pub struct Ipv4Addr(/* private fields */);
展开描述

std::net::Ipv4Addrno_std 实现。

注意:由于我们计划在该类型一旦稳定后用 core::net::Ipv4Addr 替换它,因此该类型本身的标识不应被视为 semver 稳定。不过,其对外提供的接口是稳定的,它们是 core::net::Ipv4Addr 所提供接口的一个子集。

trait 实现§

Source§

impl AsRef<[u8; 4]> for Ipv4Addr

Source§

fn as_ref(&self) -> &[u8; 4]

将该类型转换为(通常按类型推导出的)输入类型的共享引用。
Source§

impl Clone for Ipv4Addr

Source§

fn clone(&self) -> Ipv4Addr

返回该值的一个副本。更多信息
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. 更多信息
Source§

impl Debug for Ipv4Addr

Source§

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

使用给定的格式化器格式化该值。更多信息
Source§

impl From<[u8; 4]> for Ipv4Addr

Source§

fn from(value: [u8; 4]) -> Self

将该输入类型转换为此类型。
Source§

impl From<Ipv4Addr> for Ipv4Addr

Available on crate feature std only.
Source§

fn from(addr: Ipv4Addr) -> Self

将该输入类型转换为此类型。
Source§

impl From<Ipv4Addr> for Ipv4Addr

Available on crate feature std only.
Source§

fn from(value: Ipv4Addr) -> Self

将该输入类型转换为此类型。
Source§

impl From<Ipv4Addr> for ServerName<'_>

Source§

fn from(v4: Ipv4Addr) -> Self

将该输入类型转换为此类型。
Source§

impl Hash for Ipv4Addr

Source§

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

将该值送入给定的 Hasher 中。更多信息
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. 更多信息
Source§

impl PartialEq for Ipv4Addr

Source§

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

测试 selfother 值是否相等,供 == 使用。
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<&str> for Ipv4Addr

Source§

type Error = AddrParseError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &str) -> Result<Self, Self::Error>

执行转换。
Source§

impl Copy for Ipv4Addr

Source§

impl Eq for Ipv4Addr

Source§

impl StructuralPartialEq for Ipv4Addr

自动 trait 实现§

blanket 实现§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. 更多信息
Source§

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

Source§

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

Mutably borrows from an owned value. 更多信息
Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 更多信息
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回参数。

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

即此转换的实际行为取决于 From<T> for U 的实现。

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. 更多信息
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 更多信息
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

执行转换。