fidl::endpoints

Trait DiscoverableProtocolMarker

Source
pub trait DiscoverableProtocolMarker: ProtocolMarker {
    const PROTOCOL_NAME: &'static str = <Self as ProtocolMarker>::DEBUG_NAME;
}
Expand description

A marker for a particular FIDL protocol that is also discoverable.

Discoverable protocols may be referred to by a string name, and can be conveniently exported in a service directory via an entry of that name.

If you get an error about this trait not being implemented, you probably need to add the @discoverable attribute to the FIDL protocol, like this:

@discoverable
protocol MyProtocol { ... };

Provided Associated Constants§

Source

const PROTOCOL_NAME: &'static str = <Self as ProtocolMarker>::DEBUG_NAME

The name of the protocol (to be used for service lookup and discovery).

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.

Implementors§