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>
pub fn create( &self, guest_config: GuestConfig ) -> QueryResponseFut<GuestLifecycleCreateResult>
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>
pub fn run(&self) -> QueryResponseFut<GuestLifecycleRunResult>
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>>
fn create(&self, guest_config: GuestConfig) -> Self::CreateResponseFut
fn bind(&self, guest: ServerEnd<GuestMarker>) -> Result<(), Error>
type RunResponseFut = QueryResponseFut<Result<(), GuestError>>
fn run(&self) -> Self::RunResponseFut
type StopResponseFut = QueryResponseFut<()>
fn stop(&self) -> Self::StopResponseFut
source§impl Proxy for GuestLifecycleProxy
impl Proxy for GuestLifecycleProxy
§type Protocol = GuestLifecycleMarker
type Protocol = GuestLifecycleMarker
Proxy
controls.