pub struct Vsock(/* private fields */);
Implementations§
Source§impl Vsock
impl Vsock
Sourcepub async fn new(
guest_vsock_device: Option<DeviceProxy>,
loopback_vsock_device: Option<DeviceProxy>,
) -> Result<(Self, impl Future<Output = Result<Vec<Infallible>, Error>>), Error>
pub async fn new( guest_vsock_device: Option<DeviceProxy>, loopback_vsock_device: Option<DeviceProxy>, ) -> Result<(Self, impl Future<Output = Result<Vec<Infallible>, Error>>), Error>
Creates a new vsock service connected to the given DeviceProxy
The creation is asynchronous due to need to invoke methods on the given DeviceProxy
. On
success a pair of Self, impl Future<Result<_, Error>>
is returned. The impl Future
is
a future that is listening for and processing messages from the device
. This future needs
to be evaluated for other methods on the returned Self
to complete successfully. Unless
a fatal error occurs the future will never yield a result and will execute infinitely.
Sourcepub async fn run_client_connection(self, request: ConnectorRequestStream)
pub async fn run_client_connection(self, request: ConnectorRequestStream)
Evaluates messages on a ConnectorRequestStream
until completion or error
Takes ownership of a RequestStream
that is most likely created from a ServicesServer
and processes any incoming requests on it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Vsock
impl !RefUnwindSafe for Vsock
impl !Send for Vsock
impl !Sync for Vsock
impl Unpin for Vsock
impl !UnwindSafe for Vsock
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
)