pub struct ManagedRealmSynchronousProxy { /* private fields */ }Implementations§
Source§impl ManagedRealmSynchronousProxy
impl ManagedRealmSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ManagedRealmEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ManagedRealmEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_moniker(
&self,
___deadline: MonotonicInstant,
) -> Result<String, Error>
pub fn get_moniker( &self, ___deadline: MonotonicInstant, ) -> Result<String, Error>
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 add_device(
&self,
path: &str,
device: ClientEnd<DeviceProxy_Marker>,
___deadline: MonotonicInstant,
) -> Result<ManagedRealmAddDeviceResult, Error>
pub fn add_device( &self, path: &str, device: ClientEnd<DeviceProxy_Marker>, ___deadline: MonotonicInstant, ) -> Result<ManagedRealmAddDeviceResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<ManagedRealmRemoveDeviceResult, Error>
pub fn remove_device( &self, path: &str, ___deadline: MonotonicInstant, ) -> Result<ManagedRealmRemoveDeviceResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<ManagedRealmStartChildComponentResult, Error>
pub fn start_child_component( &self, child_name: &str, ___deadline: MonotonicInstant, ) -> Result<ManagedRealmStartChildComponentResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<ManagedRealmStopChildComponentResult, Error>
pub fn stop_child_component( &self, child_name: &str, ___deadline: MonotonicInstant, ) -> Result<ManagedRealmStopChildComponentResult, Error>
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 Debug for ManagedRealmSynchronousProxy
impl Debug for ManagedRealmSynchronousProxy
Source§impl From<Channel> for ManagedRealmSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ManagedRealmSynchronousProxy
Source§impl From<ManagedRealmSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<ManagedRealmSynchronousProxy> for Handle
Source§fn from(value: ManagedRealmSynchronousProxy) -> Self
fn from(value: ManagedRealmSynchronousProxy) -> Self
Source§impl FromClient for ManagedRealmSynchronousProxy
Available on Fuchsia only.
impl FromClient for ManagedRealmSynchronousProxy
Source§type Protocol = ManagedRealmMarker
type Protocol = ManagedRealmMarker
Source§fn from_client(value: ClientEnd<ManagedRealmMarker>) -> Self
fn from_client(value: ClientEnd<ManagedRealmMarker>) -> Self
Source§impl SynchronousProxy for ManagedRealmSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ManagedRealmSynchronousProxy
Source§type Proxy = ManagedRealmProxy
type Proxy = ManagedRealmProxy
Source§type Protocol = ManagedRealmMarker
type Protocol = ManagedRealmMarker
Proxy controls.