pub struct VmAddress(/* private fields */);
Expand description
A VM socket address.
Implementations§
Source§impl VmAddress
impl VmAddress
Sourcepub fn vsock_any(port: u32) -> Self
pub fn vsock_any(port: u32) -> Self
Creates a new address referring to any VM, with the specified VSOCK port.
Sourcepub fn vsock_host(port: u32) -> Self
pub fn vsock_host(port: u32) -> Self
Creates a new address referring to the host, with the specified VSOCK port.
Sourcepub fn try_from_sock_addr(addr: &SockAddr) -> Option<Self>
pub fn try_from_sock_addr(addr: &SockAddr) -> Option<Self>
Creates a new address from the specified [SockAddr
] when the address
is an AF_HYPERV
(on Windows) or AF_VSOCK
(on Linux) address.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmAddress
impl RefUnwindSafe for VmAddress
impl Send for VmAddress
impl Sync for VmAddress
impl Unpin for VmAddress
impl UnwindSafe for VmAddress
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