pub struct AJ {}Implementations§
Source§impl AJ
impl AJ
Sourcepub fn start(backend: impl Backend + Send + Sync + 'static) -> ActorRef<AJ>
pub fn start(backend: impl Backend + Send + Sync + 'static) -> ActorRef<AJ>
Start AJ with a custom backend
Sourcepub fn quick_start() -> ActorRef<AJ>
pub fn quick_start() -> ActorRef<AJ>
Quick start AJ with in-memory backend
pub async fn enqueue_job<M>( job: Job<M>, config: EnqueueConfig, queue_name: &str, ) -> Result<(), Error>
pub async fn cancel_job<M>(job_id: String) -> Result<(), Error>
pub async fn get_job<M>(job_id: &str) -> Option<Job<M>>
pub async fn update_job<M>( job_id: &str, data: M, context: Option<JobContext>, ) -> Result<(), Error>
pub async fn retry_job<M>(job_id: &str) -> Result<bool, Error>
pub async fn add_job<M>(job: Job<M>, queue_name: &str) -> Result<String, Error>
pub async fn update_work_queue<M>(config: WorkQueueConfig) -> Result<(), Error>
pub async fn register_plugin( plugin: impl JobPlugin + Send + Sync + 'static, ) -> Result<(), Error>
Trait Implementations§
Source§impl Actor for AJ
impl Actor for AJ
Source§fn name() -> &'static str
fn name() -> &'static str
The name of the actor, which can be useful for logging or debugging. Read more
Source§fn new_mailbox() -> (<AJ as Actor>::Mailbox, <<AJ as Actor>::Mailbox as Mailbox<AJ>>::Receiver)
fn new_mailbox() -> (<AJ as Actor>::Mailbox, <<AJ as Actor>::Mailbox as Mailbox<AJ>>::Receiver)
Creates a new mailbox for the actor. This sets up the message queue and receiver for the actor. Read more
Source§fn on_start(
&mut self,
actor_ref: ActorRef<Self>,
) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send
fn on_start( &mut self, actor_ref: ActorRef<Self>, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send
Called when the actor starts, before it processes any messages. Read more
Source§fn on_panic(
&mut self,
actor_ref: WeakActorRef<Self>,
err: PanicError,
) -> impl Future<Output = Result<Option<ActorStopReason>, Box<dyn Error + Send + Sync>>> + Send
fn on_panic( &mut self, actor_ref: WeakActorRef<Self>, err: PanicError, ) -> impl Future<Output = Result<Option<ActorStopReason>, Box<dyn Error + Send + Sync>>> + Send
Called when the actor encounters a panic or an error during “tell” message handling. Read more
Source§fn on_link_died(
&mut self,
actor_ref: WeakActorRef<Self>,
id: ActorID,
reason: ActorStopReason,
) -> impl Future<Output = Result<Option<ActorStopReason>, Box<dyn Error + Send + Sync>>> + Send
fn on_link_died( &mut self, actor_ref: WeakActorRef<Self>, id: ActorID, reason: ActorStopReason, ) -> impl Future<Output = Result<Option<ActorStopReason>, Box<dyn Error + Send + Sync>>> + Send
Called when a linked actor dies. Read more
Source§impl<M> Message<JustRunJob<M>> for AJ
impl<M> Message<JustRunJob<M>> for AJ
Auto Trait Implementations§
impl Freeze for AJ
impl RefUnwindSafe for AJ
impl Send for AJ
impl Sync for AJ
impl Unpin for AJ
impl UnwindSafe for AJ
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<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn(
self: Box<T>,
state: &mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Debug + Send>>> + Send + '_>>
fn handle_dyn( self: Box<T>, state: &mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, ) -> Pin<Box<dyn Future<Output = Option<Box<dyn Debug + Send>>> + Send + '_>>
Handles the dyn message with the provided actor state, ref, and reply sender.
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