pub struct ManagedRealmProxy { /* private fields */ }Implementations§
Source§impl ManagedRealmProxy
impl ManagedRealmProxy
Sourcepub fn take_event_stream(&self) -> ManagedRealmEventStream
pub fn take_event_stream(&self) -> ManagedRealmEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_moniker(
&self,
) -> QueryResponseFut<String, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_moniker( &self, ) -> QueryResponseFut<String, DefaultFuchsiaResourceDialect> ⓘ
Returns the moniker of the root of the managed realm.
- response
monikerthe moniker of the root of the generated topology that contains this realm’s child components.
Sourcepub fn connect_to_protocol(
&self,
protocol_name: &str,
child_name: Option<&str>,
req: Channel,
) -> Result<(), Error>
pub fn connect_to_protocol( &self, protocol_name: &str, child_name: Option<&str>, req: Channel, ) -> Result<(), Error>
Connects to a protocol named protocol_name provided by a child in this
realm.
If child_name is not provided, connects to the first child offering
protocol_name.
- request
protocol_namethe name of the protocol to connect to. - request
child_namethe name of the child component that is exposing the requested protocol. - request
reqa channel to be bound to an implementation of the protocol.
Sourcepub fn connect_to_service(
&self,
service_name: &str,
child_name: Option<&str>,
req: Channel,
) -> Result<(), Error>
pub fn connect_to_service( &self, service_name: &str, child_name: Option<&str>, req: Channel, ) -> Result<(), Error>
Connects to a service named service_name provided by a child in this
realm.
If child_name is not provided, connects to the first child offering
service_name.
- request
service_namethe name of the service to connect to. - request
child_namethe name of the child component that is exposing the requested service. - request
reqa channel to be bound to the service directory.
Sourcepub fn add_device(
&self,
path: &str,
device: ClientEnd<DeviceProxy_Marker>,
) -> QueryResponseFut<ManagedRealmAddDeviceResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn add_device( &self, path: &str, device: ClientEnd<DeviceProxy_Marker>, ) -> QueryResponseFut<ManagedRealmAddDeviceResult, DefaultFuchsiaResourceDialect> ⓘ
Mounts new virtual device device on netemul’s devfs instance within
this realm.
This devfs instance is available to components that have the
[Capability.netemul_devfs] capability.
- request
pathrelative path fromdevfsroot to the virtual device to be added to the realm. - request
devicevirtual device server.
- error
ZX_ERR_ALREADY_EXISTSifdevice.pathis already in use. - error
ZX_ERR_INVALID_ARGSif an element ofpathexceeds [fuchsia.io/MAX_FILENAME] bytes in length.
Sourcepub fn remove_device(
&self,
path: &str,
) -> QueryResponseFut<ManagedRealmRemoveDeviceResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn remove_device( &self, path: &str, ) -> QueryResponseFut<ManagedRealmRemoveDeviceResult, DefaultFuchsiaResourceDialect> ⓘ
Removes virtual device mounted at path.
- request
paththe path to virtual device to be removed from the realm, relative todevfsroot.
- error
ZX_ERR_NOT_FOUNDifpathis not currently bound to a device. - error
ZX_ERR_INVALID_ARGSif an element ofpathexceeds [fuchsia.io/MAX_FILENAME] bytes in length.
Sourcepub fn get_devfs(&self, devfs: ServerEnd<DirectoryMarker>) -> Result<(), Error>
pub fn get_devfs(&self, devfs: ServerEnd<DirectoryMarker>) -> Result<(), Error>
Connects to netemul’s devfs instance for this realm.
- request
devfsrequest handle to thedevfsdirectory.
Sourcepub fn start_child_component(
&self,
child_name: &str,
) -> QueryResponseFut<ManagedRealmStartChildComponentResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn start_child_component( &self, child_name: &str, ) -> QueryResponseFut<ManagedRealmStartChildComponentResult, DefaultFuchsiaResourceDialect> ⓘ
Starts the specified child component in this realm. Starting an already running child component is a no-op and returns success.
- request
child_namethe name of the child component to be started.
- error
ZX_ERR_NOT_FOUNDifchild_nameis not a child component in this realm. - error
ZX_ERR_INVALID_ARGSifchild_namecannot be composed into a well-formed moniker. - error
ZX_ERR_INTERNALif the call to the service dependency fails.
Sourcepub fn stop_child_component(
&self,
child_name: &str,
) -> QueryResponseFut<ManagedRealmStopChildComponentResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn stop_child_component( &self, child_name: &str, ) -> QueryResponseFut<ManagedRealmStopChildComponentResult, DefaultFuchsiaResourceDialect> ⓘ
Stops the specified child component in this realm. Stopping an already stopped child component is a no-op and returns success.
- request
child_namethe name of the child component to be stopped.
- error
ZX_ERR_NOT_FOUNDifchild_nameis not a child component in this realm. - error
ZX_ERR_INVALID_ARGSifchild_namecannot be composed into a well-formed moniker. - error
ZX_ERR_INTERNALif the call to the service dependency fails.
Sourcepub fn shutdown(&self) -> Result<(), Error>
pub fn shutdown(&self) -> Result<(), Error>
Request that the managed realm shut down.
The realm will send an OnShutdown event when shutdown is complete and
before closing the channel.
Sourcepub fn open_diagnostics_directory(
&self,
child_name: &str,
directory: ServerEnd<DirectoryMarker>,
) -> Result<(), Error>
pub fn open_diagnostics_directory( &self, child_name: &str, directory: ServerEnd<DirectoryMarker>, ) -> Result<(), Error>
Opens the diagnostics directory exposed by the component child_name.
Sourcepub fn get_crash_listener(
&self,
listener: ServerEnd<CrashListenerMarker>,
) -> Result<(), Error>
pub fn get_crash_listener( &self, listener: ServerEnd<CrashListenerMarker>, ) -> Result<(), Error>
Creates a new [CrashListener] instance scoped to this realm.
Trait Implementations§
Source§impl Clone for ManagedRealmProxy
impl Clone for ManagedRealmProxy
Source§impl Debug for ManagedRealmProxy
impl Debug for ManagedRealmProxy
Source§impl ManagedRealmProxyInterface for ManagedRealmProxy
impl ManagedRealmProxyInterface for ManagedRealmProxy
type GetMonikerResponseFut = QueryResponseFut<String>
type AddDeviceResponseFut = QueryResponseFut<Result<(), i32>>
type RemoveDeviceResponseFut = QueryResponseFut<Result<(), i32>>
type StartChildComponentResponseFut = QueryResponseFut<Result<(), i32>>
type StopChildComponentResponseFut = QueryResponseFut<Result<(), i32>>
fn get_moniker(&self) -> Self::GetMonikerResponseFut
fn connect_to_protocol( &self, protocol_name: &str, child_name: Option<&str>, req: Channel, ) -> Result<(), Error>
fn connect_to_service( &self, service_name: &str, child_name: Option<&str>, req: Channel, ) -> Result<(), Error>
fn add_device( &self, path: &str, device: ClientEnd<DeviceProxy_Marker>, ) -> Self::AddDeviceResponseFut
fn remove_device(&self, path: &str) -> Self::RemoveDeviceResponseFut
fn get_devfs(&self, devfs: ServerEnd<DirectoryMarker>) -> Result<(), Error>
fn start_child_component( &self, child_name: &str, ) -> Self::StartChildComponentResponseFut
fn stop_child_component( &self, child_name: &str, ) -> Self::StopChildComponentResponseFut
fn shutdown(&self) -> Result<(), Error>
fn open_diagnostics_directory( &self, child_name: &str, directory: ServerEnd<DirectoryMarker>, ) -> Result<(), Error>
fn get_crash_listener( &self, listener: ServerEnd<CrashListenerMarker>, ) -> Result<(), Error>
Source§impl Proxy for ManagedRealmProxy
impl Proxy for ManagedRealmProxy
Source§type Protocol = ManagedRealmMarker
type Protocol = ManagedRealmMarker
Proxy controls.