pub trait CapabilityClient: Sized + 'static {
type Dependencies: ?Sized;
type Error;
const CAPABILITY_ID: &'static str;
const DESCRIPTOR_VERSION: &'static str;
// Required methods
fn from_dependencies(
dependencies: &Self::Dependencies,
) -> Result<Self, Self::Error>;
fn already_connected() -> Self::Error;
}Expand description
A generated, strongly typed client for one required Capability.
Capability binding generators implement this trait for their client type so Plugin authoring frontends can connect typed Ports without knowing the Capability’s operation kinds or handle layout. Implementations must use only the supplied Plan-owned dependencies; they must not perform discovery.
Required Associated Constants§
Sourceconst CAPABILITY_ID: &'static str
const CAPABILITY_ID: &'static str
Stable Capability identity required by this client.
Sourceconst DESCRIPTOR_VERSION: &'static str
const DESCRIPTOR_VERSION: &'static str
Exact Descriptor version understood by this generated client.
Required Associated Types§
Sourcetype Dependencies: ?Sized
type Dependencies: ?Sized
Adapter-owned dependency view used to connect this client.
Required Methods§
Sourcefn from_dependencies(
dependencies: &Self::Dependencies,
) -> Result<Self, Self::Error>
fn from_dependencies( dependencies: &Self::Dependencies, ) -> Result<Self, Self::Error>
Connects this client to one Plugin Instance’s resolved dependencies.
Sourcefn already_connected() -> Self::Error
fn already_connected() -> Self::Error
Creates the adapter failure for an invalid second connection attempt.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".