pub trait ProtocolPlugin: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn features(&self) -> Vec<String>;
fn default_port(&self) -> Option<u16>;
fn validate_config<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 dyn Any,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_server<'life0, 'async_trait>(
&'life0 self,
config: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Server>, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_connection_factory<'life0, 'async_trait>(
&'life0 self,
config: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ConnectionFactory>, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn config_type_name(&self) -> &str;
}experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Expand description
Protocol plugin interface
Required Methodsยง
Sourcefn name(&self) -> &str
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn name(&self) -> &str
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Get protocol name
Sourcefn description(&self) -> &str
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn description(&self) -> &str
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Get protocol description
Sourcefn features(&self) -> Vec<String>
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn features(&self) -> Vec<String>
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Get protocol features
Sourcefn default_port(&self) -> Option<u16>
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn default_port(&self) -> Option<u16>
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Get default port
Sourcefn validate_config<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 dyn Any,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn validate_config<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 dyn Any,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Validate configuration
Sourcefn create_server<'life0, 'async_trait>(
&'life0 self,
config: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Server>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn create_server<'life0, 'async_trait>(
&'life0 self,
config: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Server>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Create server
Sourcefn create_connection_factory<'life0, 'async_trait>(
&'life0 self,
config: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ConnectionFactory>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn create_connection_factory<'life0, 'async_trait>(
&'life0 self,
config: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ConnectionFactory>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Create connection factory
Sourcefn config_type_name(&self) -> &str
๐Deprecated since 1.0.9: experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
fn config_type_name(&self) -> &str
experimental plugin system, not wired into the transport path; scheduled for removal in 2.0
Supported configuration type name
Dyn Compatibilityยง
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".