pub struct HostVmbusTransport { /* private fields */ }
Expand description
Represents a relay between a vmbus server on the host, and the vmbus server running in Underhill, allowing offers from the host and offers from Underhill to be mixed.
The relay will connect to the host when it first receives a start request through its state unit, and will remain connected until it is destroyed.
Implementations§
Source§impl HostVmbusTransport
impl HostVmbusTransport
Sourcepub async fn new(
driver: impl SpawnDriver + Clone,
control: Arc<VmbusServerControl>,
channel: VmbusRelayChannelHalf,
hvsock_relay: HvsockRelayChannelHalf,
vmbus_client: VmbusClientAccess,
connection: ConnectResult,
intercept_list: Vec<(Guid, Sender<InterceptChannelRequest>)>,
) -> Result<Self>
pub async fn new( driver: impl SpawnDriver + Clone, control: Arc<VmbusServerControl>, channel: VmbusRelayChannelHalf, hvsock_relay: HvsockRelayChannelHalf, vmbus_client: VmbusClientAccess, connection: ConnectResult, intercept_list: Vec<(Guid, Sender<InterceptChannelRequest>)>, ) -> Result<Self>
Create a new instance of the host vmbus relay.
pub fn start(&self)
pub async fn stop(&self)
pub async fn save(&self) -> SavedState
pub async fn restore(&self, state: SavedState) -> Result<()>
Trait Implementations§
Source§impl Debug for HostVmbusTransport
impl Debug for HostVmbusTransport
Auto Trait Implementations§
impl Freeze for HostVmbusTransport
impl !RefUnwindSafe for HostVmbusTransport
impl Send for HostVmbusTransport
impl Sync for HostVmbusTransport
impl Unpin for HostVmbusTransport
impl !UnwindSafe for HostVmbusTransport
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