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§
Sourcefn connect() -> Result<Self, Error>
fn connect() -> Result<Self, Error>
Connect to a FIDL protocol in the /svc
directory of the application’s root namespace.
Sourcefn connect_at(service_prefix: impl AsRef<str>) -> Result<Self, Error>
fn connect_at(service_prefix: impl AsRef<str>) -> Result<Self, Error>
Connect to a FIDL protocol using the provided namespace prefix.
Sourcefn connect_at_dir_svc(directory: &impl AsRefDirectory) -> Result<Self, Error>
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.
Sourcefn connect_at_dir_root(directory: &impl AsRefDirectory) -> Result<Self, Error>
fn connect_at_dir_root(directory: &impl AsRefDirectory) -> Result<Self, Error>
Connect to an instance of a FIDL protocol hosted in directory
.
Sourcefn connect_at_dir_root_with_name(
directory: &impl AsRefDirectory,
filename: &str,
) -> Result<Self, Error>
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", so this trait is not object safe.