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
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>,
) -> 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
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,
) -> QueryResponseFut<ManagedRealmRemoveDeviceResult, DefaultFuchsiaResourceDialect>
pub fn remove_device( &self, path: &str, ) -> QueryResponseFut<ManagedRealmRemoveDeviceResult, DefaultFuchsiaResourceDialect>
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,
) -> 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_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,
) -> 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_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 Clone for ManagedRealmProxy
impl Clone for ManagedRealmProxy
Source§fn clone(&self) -> ManagedRealmProxy
fn clone(&self) -> ManagedRealmProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§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 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>
Source§impl Proxy for ManagedRealmProxy
impl Proxy for ManagedRealmProxy
Source§type Protocol = ManagedRealmMarker
type Protocol = ManagedRealmMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ManagedRealmProxy
impl !RefUnwindSafe for ManagedRealmProxy
impl Send for ManagedRealmProxy
impl Sync for ManagedRealmProxy
impl Unpin for ManagedRealmProxy
impl !UnwindSafe for ManagedRealmProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)