pub struct RealmSynchronousProxy { /* private fields */ }Implementations§
Source§impl RealmSynchronousProxy
impl RealmSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<RealmEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<RealmEvent, 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 open_controller(
&self,
child: &ChildRef,
controller: ServerEnd<ControllerMarker>,
___deadline: MonotonicInstant,
) -> Result<RealmOpenControllerResult, Error>
pub fn open_controller( &self, child: &ChildRef, controller: ServerEnd<ControllerMarker>, ___deadline: MonotonicInstant, ) -> Result<RealmOpenControllerResult, Error>
Operate on a child component. See documentation for [Controller].
Errors:
INVALID_ARGUMENTS:childis not a valid child reference.INSTANCE_NOT_FOUND:childdoes not exist.INSTANCE_DIED: This realm no longer exists.
Sourcepub fn open_exposed_dir(
&self,
child: &ChildRef,
exposed_dir: ServerEnd<DirectoryMarker>,
___deadline: MonotonicInstant,
) -> Result<RealmOpenExposedDirResult, Error>
pub fn open_exposed_dir( &self, child: &ChildRef, exposed_dir: ServerEnd<DirectoryMarker>, ___deadline: MonotonicInstant, ) -> Result<RealmOpenExposedDirResult, Error>
Opens the exposed directory of a child component instance. When this
function successfully returns, exposed_dir is bound to a directory
that contains the capabilities which the child exposed to its realm
via ComponentDecl.exposes (specified via “expose” declarations in
the component’s manifest). The child component will not start as a
result of this call. Instead, starting will occur iff the parent binds
to one of the capabilities contained within exposed_dir.
exposed_dir is open as long as child exists.
Errors:
INVALID_ARGUMENTS:childis not a valid child reference.INSTANCE_NOT_FOUND:childdoes not exist.INSTANCE_CANNOT_RESOLVE:child’s component declaration failed to resolve.INSTANCE_DIED: This realm no longer exists.
Sourcepub fn create_child(
&self,
collection: &CollectionRef,
decl: &Child,
args: CreateChildArgs,
___deadline: MonotonicInstant,
) -> Result<RealmCreateChildResult, Error>
pub fn create_child( &self, collection: &CollectionRef, decl: &Child, args: CreateChildArgs, ___deadline: MonotonicInstant, ) -> Result<RealmCreateChildResult, Error>
Creates a child component instance dynamically. When this function returns successfully, the instance exists, but it may not be running.
The environment of the child instance is determined by the environment
of the collection. decl must not set environment.
If decl.startup == EAGER, or collection.durability == SINGLE_RUN,
[CreateChild] will start the component and return once the component is
started. Otherwise, [CreateChild] will return immediately after creating
the component and will not start or resolve it.
Errors:
INVALID_ARGUMENTS:collectionis not a valid reference orchildis not a valid declaration.COLLECTION_NOT_FOUND:collectiondoes not exist.INSTANCE_ALREADY_EXISTS:decl.namealready exists incollection.INSTANCE_CANNOT_RESOLVE:child’s component declaration failed to resolve in aSingleRuncollection.NO_SPACE: Could not allocate storage for the new instance.INSTANCE_DIED: This realm no longer exists.
Sourcepub fn destroy_child(
&self,
child: &ChildRef,
___deadline: MonotonicInstant,
) -> Result<RealmDestroyChildResult, Error>
pub fn destroy_child( &self, child: &ChildRef, ___deadline: MonotonicInstant, ) -> Result<RealmDestroyChildResult, Error>
Destroys a dynamically-created component instance. When this function returns, the instance is destroyed and has stopped running. However, cleanup of the component’s resources (such as its isolated storage) may happen in the background after this function returns.
Errors:
INVALID_ARGUMENTS:childis not a valid reference or does not refer to a dynamic instance.INSTANCE_NOT_FOUND:childdoes not exist.COLLECTION_NOT_FOUND:collectiondoes not exist.INSTANCE_DIED: This realm no longer exists.
Sourcepub fn list_children(
&self,
collection: &CollectionRef,
iter: ServerEnd<ChildIteratorMarker>,
___deadline: MonotonicInstant,
) -> Result<RealmListChildrenResult, Error>
pub fn list_children( &self, collection: &CollectionRef, iter: ServerEnd<ChildIteratorMarker>, ___deadline: MonotonicInstant, ) -> Result<RealmListChildrenResult, Error>
Returns an iterator that lists all instances in a collection.
NOTE: The results are not guaranteed to be consistent. Instances may be created or destroyed while the iterator is live, but those changes won’t be observed by the iterator after this method returns.
Errors:
INVALID_ARGUMENTS:collectionis not a valid reference oriterdoes not haveZX_RIGHT_WAIT.COLLECTION_NOT_FOUND:collectiondoes not exist.INSTANCE_DIED: This realm no longer exists.- If
iterdoes not have standard channel rights, this function may returnACCESS_DENIEDor component manager may closeiter.
Sourcepub fn get_resolved_info(
&self,
___deadline: MonotonicInstant,
) -> Result<RealmGetResolvedInfoResult, Error>
pub fn get_resolved_info( &self, ___deadline: MonotonicInstant, ) -> Result<RealmGetResolvedInfoResult, Error>
Returns the set of information that was given to the component framework by this component’s resolver.
pub fn get_child_output_dictionary( &self, child: &ChildRef, ___deadline: MonotonicInstant, ) -> Result<RealmGetChildOutputDictionaryResult, Error>
Trait Implementations§
Source§impl Debug for RealmSynchronousProxy
impl Debug for RealmSynchronousProxy
Source§impl From<Channel> for RealmSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for RealmSynchronousProxy
Source§impl From<RealmSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<RealmSynchronousProxy> for Handle
Source§fn from(value: RealmSynchronousProxy) -> Self
fn from(value: RealmSynchronousProxy) -> Self
Source§impl FromClient for RealmSynchronousProxy
Available on Fuchsia only.
impl FromClient for RealmSynchronousProxy
Source§type Protocol = RealmMarker
type Protocol = RealmMarker
Source§fn from_client(value: ClientEnd<RealmMarker>) -> Self
fn from_client(value: ClientEnd<RealmMarker>) -> Self
Source§impl SynchronousProxy for RealmSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for RealmSynchronousProxy
Source§type Proxy = RealmProxy
type Proxy = RealmProxy
Source§type Protocol = RealmMarker
type Protocol = RealmMarker
Proxy controls.