pub struct Worker {
pub db_pool: Pool<ConnectionManager<PgConnection>>,
}
Expand description
request processing actor. We are going to run N of them in parallel.
Fields§
§db_pool: Pool<ConnectionManager<PgConnection>>
Trait Implementations§
source§impl Actor for Worker
impl Actor for Worker
§type Context = SyncContext<Worker>
type Context = SyncContext<Worker>
Actor execution context type
source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Method is called when actor get polled first time.
source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Method is called after an actor is in
Actor::Stopping
state. There
could be several reasons for stopping. Context::stop
get called
by the actor itself. All addresses to current actor get dropped and
no more evented objects left in the context. Read moresource§impl<'a> Handler<RequestMessage<'a>> for Worker
impl<'a> Handler<RequestMessage<'a>> for Worker
process a request
Auto Trait Implementations§
impl !RefUnwindSafe for Worker
impl Send for Worker
impl Sync for Worker
impl Unpin for Worker
impl !UnwindSafe for Worker
Blanket Implementations§
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more