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:
HostConfig
Host 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
Source
pub fn
new( extension_manager:
Arc<ExtensionManagerImpl>, config:
HostConfig, ) -> Self
pub fn new( extension_manager: Arc<ExtensionManagerImpl>, config: HostConfig, ) -> Self
Create a new activation engine
Source
pub async fn
activate(&self, extension_id:
&str) ->
Result<ActivationResult>
pub async fn activate(&self, extension_id: &str) -> Result<ActivationResult>
Activate an extension
Source
pub async fn
deactivate(&self, extension_id:
&str) ->
Result<()>
pub async fn deactivate(&self, extension_id: &str) -> Result<()>
Deactivate an extension
Source
pub 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
Source
fn
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
Source
async 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)
Source
pub async fn
get_activation_history(&self) ->
Vec<ActivationRecord>
pub async fn get_activation_history(&self) -> Vec<ActivationRecord>
Get activation history
Source
pub 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 UnsafeUnpin for ActivationEngine
impl !UnwindSafe for ActivationEngine
Blanket Implementations§
Source§
impl<T>
BorrowMut<T> for T
where T: ?Sized,
impl<T>
BorrowMut<T> for T
where 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 more
Source§
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
Source§
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