pub struct VmAddress(/* private fields */);
Expand description
A VM socket address.
Implementations§
Source§impl VmAddress
impl VmAddress
Sourcepub fn hyperv(vm_id: Guid, service_id: Guid) -> Self
pub fn hyperv(vm_id: Guid, service_id: Guid) -> Self
Creates a new AF_HYPERV address from vm_id
and service_id
.
Sourcepub fn hyperv_vsock(vm_id: Guid, port: u32) -> Self
pub fn hyperv_vsock(vm_id: Guid, port: u32) -> Self
Creates a new AF_HYPERV address from vm_id
and VSOCK port
.
Sourcepub fn hyperv_any(service_id: Guid) -> Self
pub fn hyperv_any(service_id: Guid) -> Self
Creates a new AF_HYPERV address referring to any VM and the specified service ID.
Sourcepub fn hyperv_host(service_id: Guid) -> Self
pub fn hyperv_host(service_id: Guid) -> Self
Creates a new AF_HYPERV address referring to the parent VM and the specified service ID.
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.
Sourcepub fn service_id(&self) -> Guid
pub fn service_id(&self) -> Guid
Gets the service ID.
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