use super::System;
use crate::{lua_vm::LuaVM, yara_engine::YaraEngine};
use kameo::{
actor::ActorRef,
message::{Context, Message},
};
pub struct GetActorLuaVM;
impl Message<GetActorLuaVM> for System {
type Reply = Option<ActorRef<LuaVM>>;
async fn handle(&mut self, _: GetActorLuaVM, _: Context<'_, Self, Self::Reply>) -> Self::Reply {
self.lua_vm.clone()
}
}
pub struct GetActorYaraEngine;
impl Message<GetActorYaraEngine> for System {
type Reply = Option<ActorRef<YaraEngine>>;
async fn handle(
&mut self,
_: GetActorYaraEngine,
_: Context<'_, Self, Self::Reply>,
) -> Self::Reply {
self.scan_engines.yara.clone()
}
}