pub struct SocketAddr {
    pub cid: VsockCid,
    pub port: c_uint,
}Expand description
An address associated with a virtual socket.
Fields§
§cid: VsockCid§port: c_uintTrait Implementations§
source§impl Clone for SocketAddr
 
impl Clone for SocketAddr
source§fn clone(&self) -> SocketAddr
 
fn clone(&self) -> SocketAddr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for SocketAddr
 
impl Debug for SocketAddr
source§impl Display for SocketAddr
 
impl Display for SocketAddr
source§impl FromStr for SocketAddr
 
impl FromStr for SocketAddr
source§fn from_str(s: &str) -> Result<SocketAddr, AddrParseError>
 
fn from_str(s: &str) -> Result<SocketAddr, AddrParseError>
Parse a vsock SocketAddr from a string. vsock socket addresses are of the form “vsock:cid:port”.
§type Err = AddrParseError
 
type Err = AddrParseError
The associated error which can be returned from parsing.
source§impl Hash for SocketAddr
 
impl Hash for SocketAddr
source§impl Ord for SocketAddr
 
impl Ord for SocketAddr
source§fn cmp(&self, other: &SocketAddr) -> Ordering
 
fn cmp(&self, other: &SocketAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SocketAddr
 
impl PartialEq for SocketAddr
source§fn eq(&self, other: &SocketAddr) -> bool
 
fn eq(&self, other: &SocketAddr) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SocketAddr
 
impl PartialOrd for SocketAddr
source§fn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
 
fn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§impl ToSocketAddr for SocketAddr
 
impl ToSocketAddr for SocketAddr
fn to_socket_addr(&self) -> Result<SocketAddr, AddrParseError>
impl Copy for SocketAddr
impl Eq for SocketAddr
impl StructuralPartialEq for SocketAddr
Auto Trait Implementations§
impl Freeze for SocketAddr
impl RefUnwindSafe for SocketAddr
impl Send for SocketAddr
impl Sync for SocketAddr
impl Unpin for SocketAddr
impl UnwindSafe for SocketAddr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
    T: Copy,
 
impl<T> CloneToUninit for Twhere
    T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)