pub struct RealmProxy { /* private fields */ }Implementations§
Source§impl RealmProxy
impl RealmProxy
Sourcepub fn take_event_stream(&self) -> RealmEventStream
pub fn take_event_stream(&self) -> RealmEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn open_controller(
&self,
child: &ChildRef,
controller: ServerEnd<ControllerMarker>,
) -> QueryResponseFut<RealmOpenControllerResult, FDomainResourceDialect>
pub fn open_controller( &self, child: &ChildRef, controller: ServerEnd<ControllerMarker>, ) -> QueryResponseFut<RealmOpenControllerResult, FDomainResourceDialect>
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>,
) -> QueryResponseFut<RealmOpenExposedDirResult, FDomainResourceDialect>
pub fn open_exposed_dir( &self, child: &ChildRef, exposed_dir: ServerEnd<DirectoryMarker>, ) -> QueryResponseFut<RealmOpenExposedDirResult, FDomainResourceDialect>
Opens the exposed directory of a child component. 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.
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,
) -> QueryResponseFut<RealmCreateChildResult, FDomainResourceDialect>
pub fn create_child( &self, collection: &CollectionRef, decl: &Child, args: CreateChildArgs, ) -> QueryResponseFut<RealmCreateChildResult, FDomainResourceDialect>
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,
) -> QueryResponseFut<RealmDestroyChildResult, FDomainResourceDialect>
pub fn destroy_child( &self, child: &ChildRef, ) -> QueryResponseFut<RealmDestroyChildResult, FDomainResourceDialect>
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>,
) -> QueryResponseFut<RealmListChildrenResult, FDomainResourceDialect>
pub fn list_children( &self, collection: &CollectionRef, iter: ServerEnd<ChildIteratorMarker>, ) -> QueryResponseFut<RealmListChildrenResult, FDomainResourceDialect>
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,
) -> QueryResponseFut<RealmGetResolvedInfoResult, FDomainResourceDialect>
pub fn get_resolved_info( &self, ) -> QueryResponseFut<RealmGetResolvedInfoResult, FDomainResourceDialect>
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, ) -> QueryResponseFut<RealmGetChildOutputDictionaryResult, FDomainResourceDialect>
Trait Implementations§
Source§impl Clone for RealmProxy
impl Clone for RealmProxy
Source§fn clone(&self) -> RealmProxy
fn clone(&self) -> RealmProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealmProxy
impl Debug for RealmProxy
Source§impl Proxy for RealmProxy
impl Proxy for RealmProxy
Source§type Protocol = RealmMarker
type Protocol = RealmMarker
Proxy controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Source§fn into_channel(self) -> Result<Channel, Self>
fn into_channel(self) -> Result<Channel, Self>
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Source§impl RealmProxyInterface for RealmProxy
impl RealmProxyInterface for RealmProxy
type OpenControllerResponseFut = QueryResponseFut<Result<(), Error>, FDomainResourceDialect>
type OpenExposedDirResponseFut = QueryResponseFut<Result<(), Error>, FDomainResourceDialect>
type CreateChildResponseFut = QueryResponseFut<Result<(), Error>, FDomainResourceDialect>
type DestroyChildResponseFut = QueryResponseFut<Result<(), Error>, FDomainResourceDialect>
type ListChildrenResponseFut = QueryResponseFut<Result<(), Error>, FDomainResourceDialect>
type GetResolvedInfoResponseFut = QueryResponseFut<Result<Component, Error>, FDomainResourceDialect>
type GetChildOutputDictionaryResponseFut = QueryResponseFut<Result<DictionaryRef, Error>, FDomainResourceDialect>
fn open_controller( &self, child: &ChildRef, controller: ServerEnd<ControllerMarker>, ) -> Self::OpenControllerResponseFut
fn open_exposed_dir( &self, child: &ChildRef, exposed_dir: ServerEnd<DirectoryMarker>, ) -> Self::OpenExposedDirResponseFut
fn create_child( &self, collection: &CollectionRef, decl: &Child, args: CreateChildArgs, ) -> Self::CreateChildResponseFut
fn destroy_child(&self, child: &ChildRef) -> Self::DestroyChildResponseFut
fn list_children( &self, collection: &CollectionRef, iter: ServerEnd<ChildIteratorMarker>, ) -> Self::ListChildrenResponseFut
fn get_resolved_info(&self) -> Self::GetResolvedInfoResponseFut
fn get_child_output_dictionary( &self, child: &ChildRef, ) -> Self::GetChildOutputDictionaryResponseFut
Auto Trait Implementations§
impl Freeze for RealmProxy
impl !RefUnwindSafe for RealmProxy
impl Send for RealmProxy
impl Sync for RealmProxy
impl Unpin for RealmProxy
impl !UnwindSafe for RealmProxy
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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]