pub struct PluginManager { /* private fields */ }Expand description
Plugin manager
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub fn with_override() -> Self
pub fn with_override() -> Self
Create plugin manager with override allowed
Sourcepub fn register_plugin(
&self,
plugin: Arc<dyn ProtocolPlugin>,
) -> Result<(), TransportError>
pub fn register_plugin( &self, plugin: Arc<dyn ProtocolPlugin>, ) -> Result<(), TransportError>
Register plugin
Sourcepub fn unregister_plugin(&self, name: &str) -> Result<(), TransportError>
pub fn unregister_plugin(&self, name: &str) -> Result<(), TransportError>
Unregister plugin
Sourcepub fn get_plugin(&self, name: &str) -> Option<Arc<dyn ProtocolPlugin>>
pub fn get_plugin(&self, name: &str) -> Option<Arc<dyn ProtocolPlugin>>
Get plugin
Sourcepub fn list_protocols(&self) -> Vec<String>
pub fn list_protocols(&self) -> Vec<String>
List all protocols (including builtin and plugins)
Sourcepub fn get_protocol_info(&self, name: &str) -> Option<PluginInfo>
pub fn get_protocol_info(&self, name: &str) -> Option<PluginInfo>
Get protocol information
Sourcepub async fn create_server_with_plugin(
&self,
protocol: &str,
config: Box<dyn Any>,
) -> Result<Box<dyn Server>, TransportError>
pub async fn create_server_with_plugin( &self, protocol: &str, config: Box<dyn Any>, ) -> Result<Box<dyn Server>, TransportError>
Create server with plugin
Sourcepub async fn create_connection_factory_with_plugin(
&self,
protocol: &str,
config: Box<dyn Any>,
) -> Result<Box<dyn ConnectionFactory>, TransportError>
pub async fn create_connection_factory_with_plugin( &self, protocol: &str, config: Box<dyn Any>, ) -> Result<Box<dyn ConnectionFactory>, TransportError>
Create connection factory with plugin
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginManager
impl RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl UnsafeUnpin for PluginManager
impl UnwindSafe for PluginManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more