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: Time) -> Result<ManagedRealmEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> 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: Time) -> Result<String, Error>
pub fn get_moniker(&self, ___deadline: Time) -> 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: Time
) -> Result<ManagedRealmAddDeviceResult, Error>
pub fn add_device( &self, path: &str, device: ClientEnd<DeviceProxy_Marker>, ___deadline: Time ) -> 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: Time
) -> Result<ManagedRealmRemoveDeviceResult, Error>
pub fn remove_device( &self, path: &str, ___deadline: Time ) -> 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: Time
) -> Result<ManagedRealmStartChildComponentResult, Error>
pub fn start_child_component( &self, child_name: &str, ___deadline: Time ) -> 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: Time
) -> Result<ManagedRealmStopChildComponentResult, Error>
pub fn stop_child_component( &self, child_name: &str, ___deadline: Time ) -> 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
§type Proxy = ManagedRealmProxy
type Proxy = ManagedRealmProxy
§type Protocol = ManagedRealmMarker
type Protocol = ManagedRealmMarker
Proxy
controls.