Struct tokio_cron_scheduler::Context
source · [−]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
sourceimpl 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 !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more