pub struct ActivationEngine {
extension_manager: Arc<ExtensionManagerImpl>,
config: HostConfig,
event_handlers: Arc<RwLock<HashMap<String, ActivationHandler>>>,
activation_history: Arc<RwLock<Vec<ActivationRecord>>>,
}Expand description
Activation engine for managing extension activation
Fields§
§extension_manager: Arc<ExtensionManagerImpl>Extension manager
config: HostConfigHost configuration
event_handlers: Arc<RwLock<HashMap<String, ActivationHandler>>>Event handlers mapping
activation_history: Arc<RwLock<Vec<ActivationRecord>>>Activation history
Implementations§
Source§impl ActivationEngine
impl ActivationEngine
Sourcepub fn new(
extension_manager: Arc<ExtensionManagerImpl>,
config: HostConfig,
) -> Self
pub fn new( extension_manager: Arc<ExtensionManagerImpl>, config: HostConfig, ) -> Self
Create a new activation engine
Sourcepub async fn activate(&self, extension_id: &str) -> Result<ActivationResult>
pub async fn activate(&self, extension_id: &str) -> Result<ActivationResult>
Activate an extension
Sourcepub async fn deactivate(&self, extension_id: &str) -> Result<()>
pub async fn deactivate(&self, extension_id: &str) -> Result<()>
Deactivate an extension
Sourcepub async fn trigger_activation(
&self,
event: &str,
context: &ActivationContext,
) -> Result<Vec<ActivationResult>>
pub async fn trigger_activation( &self, event: &str, context: &ActivationContext, ) -> Result<Vec<ActivationResult>>
Trigger activation for certain events
Sourcefn should_activate(
&self,
activation_event: &ActivationEvent,
events: &[ActivationEvent],
) -> bool
fn should_activate( &self, activation_event: &ActivationEvent, events: &[ActivationEvent], ) -> bool
Check if extension should activate for given event
Sourceasync fn perform_activation(
&self,
extension_id: &str,
context: &ActivationContext,
) -> Result<ActivationResult>
async fn perform_activation( &self, extension_id: &str, context: &ActivationContext, ) -> Result<ActivationResult>
Perform actual activation (placeholder - would call extension’s activate function)
Sourcepub async fn get_activation_history(&self) -> Vec<ActivationRecord>
pub async fn get_activation_history(&self) -> Vec<ActivationRecord>
Get activation history
Sourcepub async fn get_activation_history_for_extension(
&self,
extension_id: &str,
) -> Vec<ActivationRecord>
pub async fn get_activation_history_for_extension( &self, extension_id: &str, ) -> Vec<ActivationRecord>
Get activation history for a specific extension
Auto Trait Implementations§
impl Freeze for ActivationEngine
impl !RefUnwindSafe for ActivationEngine
impl Send for ActivationEngine
impl Sync for ActivationEngine
impl Unpin for ActivationEngine
impl !UnwindSafe for ActivationEngine
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request