pub struct GuestLifecycleProxy { /* private fields */ }
Implementations§
Source§impl GuestLifecycleProxy
impl GuestLifecycleProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.virtualization/GuestLifecycle.
Sourcepub fn take_event_stream(&self) -> GuestLifecycleEventStream
pub fn take_event_stream(&self) -> GuestLifecycleEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn create(
&self,
guest_config: GuestConfig,
) -> QueryResponseFut<GuestLifecycleCreateResult, DefaultFuchsiaResourceDialect>
pub fn create( &self, guest_config: GuestConfig, ) -> QueryResponseFut<GuestLifecycleCreateResult, DefaultFuchsiaResourceDialect>
Create a VMM configured with the provided config. This instantiates all devices and loads the kernel without starting the VCPU or device dispatch loops.
Possible errors: - ALREADY_RUNNING: A VMM instance is already running, and must be stopped before being recreated.
All other errors are related to VMM initialization.
Sourcepub fn bind(&self, guest: ServerEnd<GuestMarker>) -> Result<(), Error>
pub fn bind(&self, guest: ServerEnd<GuestMarker>) -> Result<(), Error>
Binds to the Guest protocol for an initialized guest.
This operation must be called between Create
and Stop
, otherwise the provided channel
will be immediately closed.
Sourcepub fn run(
&self,
) -> QueryResponseFut<GuestLifecycleRunResult, DefaultFuchsiaResourceDialect>
pub fn run( &self, ) -> QueryResponseFut<GuestLifecycleRunResult, DefaultFuchsiaResourceDialect>
Start the primary VCPU and any dispatch loop. This will not return until the VMM stops running. On a clean shutdown (either guest or client initiated) this will return success.
Possible errors: - ALREADY_RUNING: The VMM has already been started. - NOT_CREATED: Run was called before the VMM was created. - CONTROLLER_FORCED_HALT: Stop was called on a running VMM. - VCPU_START_FAILURE: Failed to start the primary VCPU. - VCPU_RUNTIME_FAILURE: A VCPU encountered a fatal error while running the guest.
Trait Implementations§
Source§impl Clone for GuestLifecycleProxy
impl Clone for GuestLifecycleProxy
Source§fn clone(&self) -> GuestLifecycleProxy
fn clone(&self) -> GuestLifecycleProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GuestLifecycleProxy
impl Debug for GuestLifecycleProxy
Source§impl GuestLifecycleProxyInterface for GuestLifecycleProxy
impl GuestLifecycleProxyInterface for GuestLifecycleProxy
type CreateResponseFut = QueryResponseFut<Result<(), GuestError>>
type RunResponseFut = QueryResponseFut<Result<(), GuestError>>
type StopResponseFut = QueryResponseFut<()>
fn create(&self, guest_config: GuestConfig) -> Self::CreateResponseFut
fn bind(&self, guest: ServerEnd<GuestMarker>) -> Result<(), Error>
fn run(&self) -> Self::RunResponseFut
fn stop(&self) -> Self::StopResponseFut
Source§impl Proxy for GuestLifecycleProxy
impl Proxy for GuestLifecycleProxy
Source§type Protocol = GuestLifecycleMarker
type Protocol = GuestLifecycleMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for GuestLifecycleProxy
impl !RefUnwindSafe for GuestLifecycleProxy
impl Send for GuestLifecycleProxy
impl Sync for GuestLifecycleProxy
impl Unpin for GuestLifecycleProxy
impl !UnwindSafe for GuestLifecycleProxy
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
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)
clone_to_uninit
)