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
moniker
the 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_name
the name of the protocol to connect to. - request
child_name
the name of the child component that is exposing the requested protocol. - request
req
a 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
path
relative path fromdevfs
root to the virtual device to be added to the realm. - request
device
virtual device server.
- error
ZX_ERR_ALREADY_EXISTS
ifdevice.path
is already in use. - error
ZX_ERR_INVALID_ARGS
if an element ofpath
exceeds [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
path
the path to virtual device to be removed from the realm, relative todevfs
root.
- error
ZX_ERR_NOT_FOUND
ifpath
is not currently bound to a device. - error
ZX_ERR_INVALID_ARGS
if an element ofpath
exceeds [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
devfs
request handle to thedevfs
directory.
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_name
the name of the child component to be started.
- error
ZX_ERR_NOT_FOUND
ifchild_name
is not a child component in this realm. - error
ZX_ERR_INVALID_ARGS
ifchild_name
cannot be composed into a well-formed moniker. - error
ZX_ERR_INTERNAL
if 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_name
the name of the child component to be stopped.
- error
ZX_ERR_NOT_FOUND
ifchild_name
is not a child component in this realm. - error
ZX_ERR_INVALID_ARGS
ifchild_name
cannot be composed into a well-formed moniker. - error
ZX_ERR_INTERNAL
if 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
.
Trait Implementations§
Source§impl Debug for ManagedRealmSynchronousProxy
impl Debug for ManagedRealmSynchronousProxy
Source§impl SynchronousProxy for ManagedRealmSynchronousProxy
impl SynchronousProxy for ManagedRealmSynchronousProxy
Source§type Proxy = ManagedRealmProxy
type Proxy = ManagedRealmProxy
Source§type Protocol = ManagedRealmMarker
type Protocol = ManagedRealmMarker
Proxy
controls.