pub struct JobContext { /* private fields */ }Implementations§
Source§impl JobContext
impl JobContext
pub fn new( db_pool: Arc<dyn Any + Sync + Send>, app_context: Arc<dyn Any + Sync + Send>, ) -> JobContext
pub fn db_pool<T>(&self) -> Option<&T>where
T: 'static,
pub fn app_context<T>(&self) -> Option<&T>where
T: 'static,
pub fn db_pool_arc(&self) -> Arc<dyn Any + Sync + Send>
pub fn app_context_arc(&self) -> Arc<dyn Any + Sync + Send>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobContext
impl !RefUnwindSafe for JobContext
impl Send for JobContext
impl Sync for JobContext
impl Unpin for JobContext
impl !UnwindSafe for JobContext
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