pub trait CapabilityBridge: Send + Sync {
// Required methods
fn source_protocol(&self) -> DiscoveryProtocol;
fn extract_capability_ref(
&self,
request: &Value,
) -> Result<Option<CrossProtocolCapabilityRef>, BridgeError>;
fn inject_capability_ref(
&self,
envelope: &mut Value,
cap_ref: &CrossProtocolCapabilityRef,
) -> Result<(), BridgeError>;
// Provided method
fn protocol_context(
&self,
_request: &Value,
) -> Result<Option<Value>, BridgeError> { ... }
}Expand description
Protocol-specific capability extraction/injection hooks.
Required Methods§
fn source_protocol(&self) -> DiscoveryProtocol
fn extract_capability_ref( &self, request: &Value, ) -> Result<Option<CrossProtocolCapabilityRef>, BridgeError>
fn inject_capability_ref( &self, envelope: &mut Value, cap_ref: &CrossProtocolCapabilityRef, ) -> Result<(), BridgeError>
Provided Methods§
fn protocol_context( &self, _request: &Value, ) -> Result<Option<Value>, BridgeError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".