pub struct Context {Show 14 fields
pub job_activation_tx: Sender<Uuid>,
pub notify_tx: Sender<(Uuid, JobState)>,
pub job_create_tx: Sender<(JobStoredData, Arc<RwLock<Box<JobToRunAsync>>>)>,
pub job_created_tx: Sender<Result<Uuid, (JobSchedulerError, Option<Uuid>)>>,
pub job_delete_tx: Sender<Uuid>,
pub job_deleted_tx: Sender<Result<Uuid, (JobSchedulerError, Option<Uuid>)>>,
pub notify_create_tx: Sender<(NotificationData, Arc<RwLock<Box<OnJobNotification>>>)>,
pub notify_created_tx: Sender<Result<Uuid, (JobSchedulerError, Option<Uuid>)>>,
pub notify_delete_tx: Sender<(Uuid, Option<Vec<JobState>>)>,
pub notify_deleted_tx: Sender<Result<(Uuid, bool, Option<Vec<JobState>>), (JobSchedulerError, Option<Uuid>)>>,
pub metadata_storage: Arc<RwLock<Box<dyn MetaDataStorage + Send + Sync>>>,
pub notification_storage: Arc<RwLock<Box<dyn NotificationStore + Send + Sync>>>,
pub job_code: Arc<RwLock<Box<dyn JobCode + Send + Sync>>>,
pub notification_code: Arc<RwLock<Box<dyn NotificationCode + Send + Sync>>>,
}
Fields§
§job_activation_tx: Sender<Uuid>
§notify_tx: Sender<(Uuid, JobState)>
§job_create_tx: Sender<(JobStoredData, Arc<RwLock<Box<JobToRunAsync>>>)>
§job_created_tx: Sender<Result<Uuid, (JobSchedulerError, Option<Uuid>)>>
§job_delete_tx: Sender<Uuid>
§job_deleted_tx: Sender<Result<Uuid, (JobSchedulerError, Option<Uuid>)>>
§notify_create_tx: Sender<(NotificationData, Arc<RwLock<Box<OnJobNotification>>>)>
§notify_created_tx: Sender<Result<Uuid, (JobSchedulerError, Option<Uuid>)>>
§notify_delete_tx: Sender<(Uuid, Option<Vec<JobState>>)>
§notify_deleted_tx: Sender<Result<(Uuid, bool, Option<Vec<JobState>>), (JobSchedulerError, Option<Uuid>)>>
§metadata_storage: Arc<RwLock<Box<dyn MetaDataStorage + Send + Sync>>>
§notification_storage: Arc<RwLock<Box<dyn NotificationStore + Send + Sync>>>
§job_code: Arc<RwLock<Box<dyn JobCode + Send + Sync>>>
§notification_code: Arc<RwLock<Box<dyn NotificationCode + Send + Sync>>>
Implementations§
Source§impl Context
impl Context
pub fn new( metadata_storage: Arc<RwLock<Box<dyn MetaDataStorage + Send + Sync>>>, notification_storage: Arc<RwLock<Box<dyn NotificationStore + Send + Sync>>>, job_code: Arc<RwLock<Box<dyn JobCode + Send + Sync>>>, notification_code: Arc<RwLock<Box<dyn NotificationCode + Send + Sync>>>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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