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.
Sourcepub fn stop(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn stop(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Stop a running VMM. Returns once the dispatch loops have stopped. After Stop returns, Create and then Run can be called again.
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.