Struct dao::bid_escrow::storage::JobStorage
source · pub struct JobStorage { /* private fields */ }
Expand description
Stores Job-related variables and mappings.
Implementations§
source§impl JobStorage
impl JobStorage
sourcepub fn store_job_for_voting(&mut self, voting_id: VotingId, job_id: JobId)
pub fn store_job_for_voting(&mut self, voting_id: VotingId, job_id: JobId)
Links voting with a job.
sourcepub fn get_job_by_voting_id(&self, voting_id: VotingId) -> Job
pub fn get_job_by_voting_id(&self, voting_id: VotingId) -> Job
Gets the Job matching to a given id or reverts with VotingIdNotFound.
sourcepub fn get_job_or_revert(&self, job_id: JobId) -> Job
pub fn get_job_or_revert(&self, job_id: JobId) -> Job
Gets the Job with a given id or reverts with MappingItemNotAvailable.
sourcepub fn jobs_count(&self) -> u32
pub fn jobs_count(&self) -> u32
Gets the current value of jobs counter.
sourcepub fn next_job_id(&mut self) -> JobId
pub fn next_job_id(&mut self) -> JobId
Increments jobs counter.
sourcepub fn add_to_active_jobs(&mut self, job_id: JobId)
pub fn add_to_active_jobs(&mut self, job_id: JobId)
Adds a job to the list of active jobs.
sourcepub fn remove_from_active_jobs(&mut self, job_id: JobId)
pub fn remove_from_active_jobs(&mut self, job_id: JobId)
Removes a job from the list of active jobs.
sourcepub fn get_active_jobs(&self) -> Vec<JobId>
pub fn get_active_jobs(&self) -> Vec<JobId>
Returns all active jobs.
Trait Implementations§
source§impl Clone for JobStorage
impl Clone for JobStorage
source§fn clone(&self) -> JobStorage
fn clone(&self) -> JobStorage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Node for JobStorage
impl Node for JobStorage
Auto Trait Implementations§
impl RefUnwindSafe for JobStorage
impl Send for JobStorage
impl Sync for JobStorage
impl Unpin for JobStorage
impl UnwindSafe for JobStorage
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