Struct apalis_core::queue::Queue
source · [−]Expand description
Implementations
Trait Implementations
sourceimpl<T: 'static, S: 'static, H: 'static, F: 'static> Actor for Queue<T, S, H> where
S: Storage + Unpin + Storage<Output = T>,
T: Serialize + Debug + DeserializeOwned + Send,
H: Service<JobRequest<T>, Response = JobResult, Error = JobError, Future = F> + Unpin + Send + 'static,
F: Future<Output = Result<JobResult, JobError>>,
impl<T: 'static, S: 'static, H: 'static, F: 'static> Actor for Queue<T, S, H> where
S: Storage + Unpin + Storage<Output = T>,
T: Serialize + Debug + DeserializeOwned + Send,
H: Service<JobRequest<T>, Response = JobResult, Error = JobError, Future = F> + Unpin + Send + 'static,
F: Future<Output = Result<JobResult, JobError>>,
sourcefn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Called when an actor gets polled the first time.
sourcefn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in Actor::Stopping state. Read more
sourcefn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
Start a new asynchronous actor, returning its address. Read more
sourcefn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
Construct and start a new asynchronous actor, returning its address. Read more
sourcefn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: 'static + FnOnce(&mut Context<Self>) -> Self + Send,
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: 'static + FnOnce(&mut Context<Self>) -> Self + Send,
Start new actor in arbiter’s thread.
sourceimpl<T: 'static, S: 'static, H: 'static, F: 'static> Handler<WorkerManagement> for Queue<T, S, H> where
S: Storage + Unpin + Storage<Output = T>,
T: Serialize + Debug + DeserializeOwned + Send,
H: Service<JobRequest<T>, Response = JobResult, Error = JobError, Future = F> + Unpin + Send + 'static,
F: Future<Output = Result<JobResult, JobError>>,
impl<T: 'static, S: 'static, H: 'static, F: 'static> Handler<WorkerManagement> for Queue<T, S, H> where
S: Storage + Unpin + Storage<Output = T>,
T: Serialize + Debug + DeserializeOwned + Send,
H: Service<JobRequest<T>, Response = JobResult, Error = JobError, Future = F> + Unpin + Send + 'static,
F: Future<Output = Result<JobResult, JobError>>,
type Result = Result<QueueStatus, QueueError>
type Result = Result<QueueStatus, QueueError>
The type of value that this handler will return. Read more
sourcefn handle(
&mut self,
msg: WorkerManagement,
ctx: &mut Self::Context
) -> Self::Result
fn handle(
&mut self,
msg: WorkerManagement,
ctx: &mut Self::Context
) -> Self::Result
This method is called for every message received by this actor.
sourceimpl<T: 'static, S: 'static, H: 'static, F: 'static> StreamHandler<Heartbeat> for Queue<T, S, H> where
S: Storage<Output = T> + Unpin,
T: Serialize + Debug + DeserializeOwned + Send,
H: Service<JobRequest<T>, Response = JobResult, Error = JobError, Future = F> + Unpin + Send + 'static,
F: Future<Output = Result<JobResult, JobError>>,
impl<T: 'static, S: 'static, H: 'static, F: 'static> StreamHandler<Heartbeat> for Queue<T, S, H> where
S: Storage<Output = T> + Unpin,
T: Serialize + Debug + DeserializeOwned + Send,
H: Service<JobRequest<T>, Response = JobResult, Error = JobError, Future = F> + Unpin + Send + 'static,
F: Future<Output = Result<JobResult, JobError>>,
sourcefn handle(&mut self, beat: Heartbeat, ctx: &mut Self::Context)
fn handle(&mut self, beat: Heartbeat, ctx: &mut Self::Context)
Called for every message emitted by the stream.
sourcefn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
S: 'static + Stream,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
S: 'static + Stream,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.
Auto Trait Implementations
impl<T, S, H> !RefUnwindSafe for Queue<T, S, H>
impl<T, S, H> Send for Queue<T, S, H> where
H: Send,
S: Send,
impl<T, S, H> Sync for Queue<T, S, H> where
H: Sync,
S: Sync,
impl<T, S, H> Unpin for Queue<T, S, H> where
S: Unpin,
impl<T, S, H> !UnwindSafe for Queue<T, S, H>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more