pub trait ProtocolLayer:
Any
+ Send
+ Sync
+ Debug {
// Required methods
fn protocol_name(&self) -> &str;
fn as_any(&self) -> &(dyn Any + 'static);
fn to_json(&self) -> Value;
}Expand description
Trait for custom protocol layers to implement
Required Methods§
fn protocol_name(&self) -> &str
fn as_any(&self) -> &(dyn Any + 'static)
fn to_json(&self) -> Value
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".