Struct nix::sys::socket::VsockAddr

pub struct VsockAddr(pub sockaddr_vm);

Fields

pub 0: sockaddr_vm

Implementations

impl VsockAddr

VSOCK Address

The address for AF_VSOCK socket is defined as a combination of a 32-bit Context Identifier (CID) and a 32-bit port number.

pub fn new(cid: u32, port: u32) -> VsockAddr
pub fn cid(&Self) -> u32

Context Identifier (CID)

pub fn port(&Self) -> u32

Port number

Trait Implementations

impl Clone for VsockAddr
fn clone(&Self) -> VsockAddr
impl Copy for VsockAddr
impl Debug for VsockAddr
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Display for VsockAddr
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Eq for VsockAddr
impl Hash for VsockAddr
fn hash<H: Hasher>(&Self, s: &mut H)
impl PartialEq<VsockAddr> for VsockAddr
fn eq(&Self, other: &Self) -> bool

Auto Trait Implementations

impl Send for VsockAddr
impl Sync for VsockAddr
impl Unpin for VsockAddr
impl UnwindSafe for VsockAddr

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
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> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T> ToString for T
where
    T: Display + ?Sized,
fn to_string(&Self) -> String
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>