Skip to main content

Connect

Trait Connect 

Source
pub trait Connect: Sized + FromClient<Protocol: DiscoverableProtocolMarker> {
    // Provided methods
    fn connect() -> Result<Self, Error> { ... }
    fn connect_at(service_prefix: impl AsRef<str>) -> Result<Self, Error> { ... }
    fn connect_at_dir_svc(
        directory: &impl AsRefDirectory,
    ) -> Result<Self, Error> { ... }
    fn connect_at_dir_root(
        directory: &impl AsRefDirectory,
    ) -> Result<Self, Error> { ... }
    fn connect_at_dir_root_with_name(
        directory: &impl AsRefDirectory,
        filename: &str,
    ) -> Result<Self, Error> { ... }
}
Expand description

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

Provided Methods§

Source

fn connect() -> Result<Self, Error>

Connect to a FIDL protocol in the /svc directory of the application’s root namespace.

Source

fn connect_at(service_prefix: impl AsRef<str>) -> Result<Self, Error>

Connect to a FIDL protocol using the provided namespace prefix.

Source

fn connect_at_dir_svc(directory: &impl AsRefDirectory) -> Result<Self, Error>

Connect to an instance of a FIDL protocol hosted in directory, in the /svc/ subdir.

Source

fn connect_at_dir_root(directory: &impl AsRefDirectory) -> Result<Self, Error>

Connect to an instance of a FIDL protocol hosted in directory.

Source

fn connect_at_dir_root_with_name( directory: &impl AsRefDirectory, filename: &str, ) -> Result<Self, Error>

Connect to an instance of a FIDL protocol hosted in directory using the given filename.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§