pub struct ExamplePlugin { /* private fields */ }Expand description
Example implementation of a basic plugin
Implementations§
Source§impl ExamplePlugin
impl ExamplePlugin
Trait Implementations§
Source§impl CloningPlugin for ExamplePlugin
impl CloningPlugin for ExamplePlugin
Source§fn get_config(&self) -> &PluginConfig
fn get_config(&self) -> &PluginConfig
Get plugin configuration
Source§fn initialize<'life0, 'async_trait>(
&'life0 mut self,
parameters: HashMap<String, ParameterValue>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
parameters: HashMap<String, ParameterValue>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the plugin
Source§fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown the plugin
Source§fn clone_voice<'life0, 'async_trait>(
&'life0 self,
request: VoiceCloneRequest,
_context: PluginContext,
) -> Pin<Box<dyn Future<Output = Result<VoiceCloneResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clone_voice<'life0, 'async_trait>(
&'life0 self,
request: VoiceCloneRequest,
_context: PluginContext,
) -> Pin<Box<dyn Future<Output = Result<VoiceCloneResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform voice cloning
Source§fn validate_speaker_data<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 SpeakerData,
) -> Pin<Box<dyn Future<Output = Result<PluginValidationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_speaker_data<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 SpeakerData,
) -> Pin<Box<dyn Future<Output = Result<PluginValidationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate speaker data for compatibility
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PluginHealth>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PluginHealth>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get plugin health status
Source§fn update_config<'life0, 'async_trait>(
&'life0 mut self,
parameters: HashMap<String, ParameterValue>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_config<'life0, 'async_trait>(
&'life0 mut self,
parameters: HashMap<String, ParameterValue>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update plugin configuration at runtime
Source§fn get_capabilities(&self) -> &PluginCapabilities
fn get_capabilities(&self) -> &PluginCapabilities
Get plugin capabilities
Source§fn get_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PluginOperationMetrics>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PluginOperationMetrics>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get plugin metrics
Auto Trait Implementations§
impl Freeze for ExamplePlugin
impl RefUnwindSafe for ExamplePlugin
impl Send for ExamplePlugin
impl Sync for ExamplePlugin
impl Unpin for ExamplePlugin
impl UnsafeUnpin for ExamplePlugin
impl UnwindSafe for ExamplePlugin
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more