Trait mcai_worker_sdk::message_event::MessageEvent [−][src]
pub trait MessageEvent<P: DeserializeOwned + JsonSchema> {
fn get_name(&self) -> String;
fn get_short_description(&self) -> String;
fn get_description(&self) -> String;
fn get_version(&self) -> Version;
fn init(&mut self) -> Result<()> { ... }
fn is_current_job_stopped(channel: &Option<McaiChannel>) -> bool { ... }
fn process(
&self,
_channel: Option<McaiChannel>,
_parameters: P,
_job_result: JobResult
) -> Result<JobResult>
where
Self: Sized,
{ ... }
}
Expand description
Trait to describe a worker
Implement this trait to implement a worker