Crate fuchsia_component_client

Source
Expand description

Tools for starting or connecting to existing Fuchsia applications and services.

Modules§

connect
The connect module provides connect methods where the generic argument is the return type rather than the marker type. This allows them to work for different return types; the same method can be used for asynchronous proxies, synchronous proxies, client ends, etc. This also makes it possible to elide the type where the compiler can infer the type, which is not the case when using the marker types.

Structs§

ProtocolConnector
A protocol connection request that allows checking if the protocol exists.
Service
A service from an incoming namespace’s /svc directory.
ServiceInstanceDirectory
This wraps an instance directory for a service capability and provides the MemberOpener trait for it. This can be boxed and used with a |ServiceProxy::from_member_opener|.
ServiceInstanceStream
A stream iterator for a service directory that produces one item for every service instance that is added to it as they are added. Returned from Service::watch

Constants§

SVC_DIR
Path to the service directory in an application’s root namespace.

Traits§

Connect
Trait that for types that can be returned when you connect to protocols.

Functions§

clone_namespace_svc
Clone the handle to the service directory in the application’s root namespace.
connect_channel_to_protocol
Connect to a FIDL protocol using the provided channel.
connect_channel_to_protocol_at
Connect to a FIDL protocol using the provided channel and namespace prefix.
connect_channel_to_protocol_at_path
Connect to a FIDL protocol using the provided channel and namespace path.
connect_to_childs_protocol
Connects to a FIDL protocol exposed by a child that’s within the /svc directory. Only works in CFv2, and only works if this component uses fuchsia.component.Realm.
connect_to_named_protocol_at_dir_root
Connect to an instance of a FIDL protocol hosted in directory using the given filename.
connect_to_protocol
Connect to a FIDL protocol in the /svc directory of the application’s root namespace.
connect_to_protocol_at
Connect to a FIDL protocol using the provided namespace prefix.
connect_to_protocol_at_dir_root
Connect to an instance of a FIDL protocol hosted in directory.
connect_to_protocol_at_dir_svc
Connect to an instance of a FIDL protocol hosted in directory, in the /svc/ subdir.
connect_to_protocol_at_path
Connect to a FIDL protocol using the provided path.
connect_to_protocol_sync
Connect to a FIDL protocol using the application root namespace, returning a synchronous proxy.
connect_to_protocol_sync_at
Connect to a FIDL protocol using the provided namespace prefix, returning a synchronous proxy.
connect_to_service_instance
Connect to an instance of a FIDL service in the /svc directory of the application’s root namespace. instance is a path of one or more components.
connect_to_service_instance_at_dir
Connect to a named instance of a FIDL service hosted in the service subdirectory under the directory protocol channel directory
connect_to_service_instance_at_dir_svc
Connect to an instance of a FIDL service hosted in directory, in the svc/ subdir.
new_protocol_connector
Return a FIDL protocol connector at the default service directory in the application’s root namespace.
new_protocol_connector_at
Return a FIDL protocol connector at the specified service directory in the application’s root namespace.
new_protocol_connector_in_dir
Return a FIDL protocol connector at the specified service directory.
open_childs_exposed_directory
Opens the exposed directory from a child. Only works in CFv2, and only works if this component uses fuchsia.component.Realm.
open_service
Opens a FIDL service as a directory, which holds instances of the service.
open_service_at
Opens a FIDL service with a custom name as a directory, which holds instances of the service.
realm
Returns a connection to the Realm protocol. Components v2 only.