Struct apalis_sql::mysql::MysqlStorage
source · pub struct MysqlStorage<T> { /* private fields */ }Available on crate feature
mysql only.Expand description
Represents a Storage that persists to MySQL
Implementations§
source§impl MysqlStorage<()>
impl MysqlStorage<()>
source§impl<T: Serialize + DeserializeOwned> MysqlStorage<T>
impl<T: Serialize + DeserializeOwned> MysqlStorage<T>
Trait Implementations§
source§impl<T: Sync> Ack<T> for MysqlStorage<T>
impl<T: Sync> Ack<T> for MysqlStorage<T>
source§impl<T: Job + Serialize + DeserializeOwned + Sync + Send + Unpin + 'static> Backend<Request<T>> for MysqlStorage<T>
impl<T: Job + Serialize + DeserializeOwned + Sync + Send + Unpin + 'static> Backend<Request<T>> for MysqlStorage<T>
§type Stream = BackendStream<Pin<Box<dyn Stream<Item = Result<Option<Request<T>>, Error>> + Send>>>
type Stream = BackendStream<Pin<Box<dyn Stream<Item = Result<Option<Request<T>>, Error>> + Send>>>
The stream to be produced by the backend
§type Layer = AckLayer<MysqlStorage<T>, T>
type Layer = AckLayer<MysqlStorage<T>, T>
Returns the final decoration of layers
source§impl<T> Clone for MysqlStorage<T>
impl<T> Clone for MysqlStorage<T>
source§impl<T> Debug for MysqlStorage<T>
impl<T> Debug for MysqlStorage<T>
source§impl<T> Storage for MysqlStorage<T>
impl<T> Storage for MysqlStorage<T>
§type Identifier = TaskId
type Identifier = TaskId
Jobs must have Ids.
source§async fn schedule(&mut self, job: Self::Job, on: i64) -> Result<TaskId, Error>
async fn schedule(&mut self, job: Self::Job, on: i64) -> Result<TaskId, Error>
Push a job into the scheduled set
source§async fn fetch_by_id(
&self,
job_id: &TaskId
) -> Result<Option<Request<Self::Job>>, Error>
async fn fetch_by_id( &self, job_id: &TaskId ) -> Result<Option<Request<Self::Job>>, Error>
Fetch a job given an id
source§async fn reschedule(
&mut self,
job: Request<T>,
wait: Duration
) -> Result<(), Error>
async fn reschedule( &mut self, job: Request<T>, wait: Duration ) -> Result<(), Error>
Reschedule a job
Auto Trait Implementations§
impl<T> Freeze for MysqlStorage<T>
impl<T> !RefUnwindSafe for MysqlStorage<T>
impl<T> Send for MysqlStorage<T>where
T: Send,
impl<T> Sync for MysqlStorage<T>where
T: Sync,
impl<T> Unpin for MysqlStorage<T>where
T: Unpin,
impl<T> !UnwindSafe for MysqlStorage<T>
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