Struct apalis::redis::RedisConsumer [−][src]
pub struct RedisConsumer<J> where
J: 'static + Job + JobHandler<RedisConsumer<J>>, { /* fields omitted */ }
Implementations
impl<J> RedisConsumer<J> where
J: Job + JobHandler<RedisConsumer<J>>,
[src]
impl<J> RedisConsumer<J> where
J: Job + JobHandler<RedisConsumer<J>>,
[src]pub fn new(queue: &Queue<J, RedisStorage>) -> RedisConsumer<J>
[src]
pub fn id(&self) -> &String
[src]
pub fn data<D>(self, data: D) -> RedisConsumer<J> where
D: Any + Send + Sync,
[src]
D: Any + Send + Sync,
pub fn create(url: &str) -> Result<RedisConsumer<J>, RedisError>
[src]
pub fn build_producer(&self) -> Addr<RedisProducer<J>>
[src]
Trait Implementations
impl<J> Actor for RedisConsumer<J> where
J: 'static + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> Actor for RedisConsumer<J> where
J: 'static + JobHandler<RedisConsumer<J>> + Job,
[src]type Context = Context<RedisConsumer<J>>
type Context = Context<RedisConsumer<J>>
Actor execution context type
pub fn started(&mut self, ctx: &mut Context<RedisConsumer<J>>)
[src]
pub fn started(&mut self, ctx: &mut Context<RedisConsumer<J>>)
[src]Called when an actor gets polled the first time.
fn 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
fn 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
fn 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
fn start_in_arbiter<F>(arb: &Arbiter, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,
fn start_in_arbiter<F>(arb: &Arbiter, f: F) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,
Start new actor in arbiter’s thread.
impl<J> Clone for RedisConsumer<J> where
J: 'static + Clone + Job + JobHandler<RedisConsumer<J>>,
[src]
impl<J> Clone for RedisConsumer<J> where
J: 'static + Clone + Job + JobHandler<RedisConsumer<J>>,
[src]pub fn clone(&self) -> RedisConsumer<J>
[src]
pub fn clone(&self) -> RedisConsumer<J>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<J> Handler<AckJob> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> Handler<AckJob> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]Implementation of Actix Handler for Get message.
type Result = Pin<Box<dyn Future<Output = Result<Option<bool>, Error>> + 'static, Global>>
type Result = Pin<Box<dyn Future<Output = Result<Option<bool>, Error>> + 'static, Global>>
The type of value that this handler will return. Read more
pub fn handle(
&mut self,
msg: AckJob,
&mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<AckJob>>::Result
[src]
pub fn handle(
&mut self,
msg: AckJob,
&mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<AckJob>>::Result
[src]This method is called for every message received by this actor.
impl<J> Handler<RegisterConsumer> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> Handler<RegisterConsumer> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]type Result = Pin<Box<dyn Future<Output = Result<Option<bool>, Error>> + 'static, Global>>
type Result = Pin<Box<dyn Future<Output = Result<Option<bool>, Error>> + 'static, Global>>
The type of value that this handler will return. Read more
pub fn handle(
&mut self,
_msg: RegisterConsumer,
&mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<RegisterConsumer>>::Result
[src]
pub fn handle(
&mut self,
_msg: RegisterConsumer,
&mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<RegisterConsumer>>::Result
[src]This method is called for every message received by this actor.
impl<J> Handler<RetryJob> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> Handler<RetryJob> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]Implementation of Actix Handler for retrying jobs
type Result = Pin<Box<dyn Future<Output = Result<Option<i8>, Error>> + 'static, Global>>
type Result = Pin<Box<dyn Future<Output = Result<Option<i8>, Error>> + 'static, Global>>
The type of value that this handler will return. Read more
pub fn handle(
&mut self,
msg: RetryJob,
&mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<RetryJob>>::Result
[src]
pub fn handle(
&mut self,
msg: RetryJob,
&mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<RetryJob>>::Result
[src]This method is called for every message received by this actor.
impl<J> Handler<Stop> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> Handler<Stop> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]pub fn handle(
&mut self,
Stop,
ctx: &mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<Stop>>::Result
[src]
pub fn handle(
&mut self,
Stop,
ctx: &mut <RedisConsumer<J> as Actor>::Context
) -> <RedisConsumer<J> as Handler<Stop>>::Result
[src]This method is called for every message received by this actor.
impl<J> StreamHandler<FetchJob> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Send + Job,
[src]
impl<J> StreamHandler<FetchJob> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Send + Job,
[src]Implementation of Actix Handler fetching jobs.
pub fn handle(
&mut self,
_msg: FetchJob,
ctx: &mut <RedisConsumer<J> as Actor>::Context
)
[src]
pub fn handle(
&mut self,
_msg: FetchJob,
ctx: &mut <RedisConsumer<J> as Actor>::Context
)
[src]Method is called for every message received by this Actor
fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Method is called when stream get polled first time.
fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle where
S: Stream<Item = I> + 'static,
I: 'static,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle where
S: Stream<Item = I> + 'static,
I: 'static,
Self::Context: AsyncContext<Self>,
This method register stream to an actor context and
allows to handle Stream
in similar way as normal actor messages. Read more
impl<J> StreamHandler<HeartBeat> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> StreamHandler<HeartBeat> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]pub fn handle(&mut self, HeartBeat, &mut Context<RedisConsumer<J>>)
[src]
pub fn handle(&mut self, HeartBeat, &mut Context<RedisConsumer<J>>)
[src]Method is called for every message received by this Actor
pub fn finished(&mut self, &mut <RedisConsumer<J> as Actor>::Context)
[src]
pub fn finished(&mut self, &mut <RedisConsumer<J> as Actor>::Context)
[src]Method is called when stream finishes. Read more
fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Method is called when stream get polled first time.
fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle where
S: Stream<Item = I> + 'static,
I: 'static,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle where
S: Stream<Item = I> + 'static,
I: 'static,
Self::Context: AsyncContext<Self>,
This method register stream to an actor context and
allows to handle Stream
in similar way as normal actor messages. Read more
impl<J> StreamHandler<Schedule> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> StreamHandler<Schedule> for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]pub fn handle(&mut self, Schedule, ctx: &mut Context<RedisConsumer<J>>)
[src]
pub fn handle(&mut self, Schedule, ctx: &mut Context<RedisConsumer<J>>)
[src]Method is called for every message received by this Actor
pub fn finished(&mut self, &mut <RedisConsumer<J> as Actor>::Context)
[src]
pub fn finished(&mut self, &mut <RedisConsumer<J> as Actor>::Context)
[src]Method is called when stream finishes. Read more
fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Method is called when stream get polled first time.
fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle where
S: Stream<Item = I> + 'static,
I: 'static,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle where
S: Stream<Item = I> + 'static,
I: 'static,
Self::Context: AsyncContext<Self>,
This method register stream to an actor context and
allows to handle Stream
in similar way as normal actor messages. Read more
impl<J> Supervised for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]
impl<J> Supervised for RedisConsumer<J> where
J: 'static + Unpin + JobHandler<RedisConsumer<J>> + Job,
[src]pub fn restarting(&mut self, &mut Context<RedisConsumer<J>>)
[src]
pub fn restarting(&mut self, &mut Context<RedisConsumer<J>>)
[src]Called when the supervisor restarts a failed actor.
impl<J> Consumer for RedisConsumer<J> where
J: 'static + JobHandler<RedisConsumer<J>> + Job,
[src]
J: 'static + JobHandler<RedisConsumer<J>> + Job,
Auto Trait Implementations
impl<J> RefUnwindSafe for RedisConsumer<J> where
J: RefUnwindSafe,
J: RefUnwindSafe,
impl<J> Send for RedisConsumer<J>
impl<J> Sync for RedisConsumer<J> where
J: Sync,
J: Sync,
impl<J> Unpin for RedisConsumer<J>
impl<J> UnwindSafe for RedisConsumer<J> where
J: UnwindSafe,
J: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,