pub struct Schedule<S> { /* private fields */ }
Expand description
Whole passes schedule.
Implementations§
Source§impl<S> Schedule<S>
impl<S> Schedule<S>
Sourcepub fn ordered(&self) -> impl Iterator<Item = &Submission<S>>
pub fn ordered(&self) -> impl Iterator<Item = &Submission<S>>
Iterate over submissions in ordered they must be submitted.
Sourcepub fn family_count(&self) -> usize
pub fn family_count(&self) -> usize
The number of families in this schedule.
Sourcepub fn queue_count(&self) -> usize
pub fn queue_count(&self) -> usize
The number of queues in this schedule.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Family<S>>
pub fn iter(&self) -> impl Iterator<Item = &Family<S>>
Iterate over immutable references to families in this schedule.
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Family<S>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Family<S>>
Iterate over mutable references to families in this schedule
Sourcepub fn family(&self, fid: QueueFamilyId) -> Option<&Family<S>>
pub fn family(&self, fid: QueueFamilyId) -> Option<&Family<S>>
Get reference to Family
instance by the id.
Sourcepub fn family_mut(&mut self, fid: QueueFamilyId) -> Option<&mut Family<S>>
pub fn family_mut(&mut self, fid: QueueFamilyId) -> Option<&mut Family<S>>
Get mutable reference to Family
instance by the id.
Sourcepub fn queue(&self, qid: QueueId) -> Option<&Queue<S>>
pub fn queue(&self, qid: QueueId) -> Option<&Queue<S>>
Get reference to Queue
instance by the id.
Sourcepub fn queue_mut(&mut self, qid: QueueId) -> Option<&mut Queue<S>>
pub fn queue_mut(&mut self, qid: QueueId) -> Option<&mut Queue<S>>
Get mutable reference to Queue
instance by the id.
Sourcepub fn submission(&self, sid: SubmissionId) -> Option<&Submission<S>>
pub fn submission(&self, sid: SubmissionId) -> Option<&Submission<S>>
Get reference to Submission
instance by id.
Sourcepub fn submission_mut(
&mut self,
sid: SubmissionId,
) -> Option<&mut Submission<S>>
pub fn submission_mut( &mut self, sid: SubmissionId, ) -> Option<&mut Submission<S>>
Get reference to Submission
instance by id.
Sourcepub fn ensure_family(&mut self, fid: QueueFamilyId) -> &mut Family<S>
pub fn ensure_family(&mut self, fid: QueueFamilyId) -> &mut Family<S>
Get mutable reference to Family
instance by the id.
This function will add empty Family
if id is not present.
Sourcepub fn ensure_queue(&mut self, qid: QueueId) -> &mut Queue<S>
pub fn ensure_queue(&mut self, qid: QueueId) -> &mut Queue<S>
Get mutable reference to Queue
instance by the id.
This function will grow queues array if index is out of bounds.
Sourcepub fn build_order(&mut self)
pub fn build_order(&mut self)
Make ordered.
Trait Implementations§
Source§impl<S> Index<SubmissionId> for Schedule<S>
impl<S> Index<SubmissionId> for Schedule<S>
Source§type Output = Submission<S>
type Output = Submission<S>
Source§fn index(&self, sid: SubmissionId) -> &Submission<S>
fn index(&self, sid: SubmissionId) -> &Submission<S>
container[index]
) operation. Read moreSource§impl<S> IndexMut<SubmissionId> for Schedule<S>
impl<S> IndexMut<SubmissionId> for Schedule<S>
Source§fn index_mut(&mut self, sid: SubmissionId) -> &mut Submission<S>
fn index_mut(&mut self, sid: SubmissionId) -> &mut Submission<S>
container[index]
) operation. Read moreAuto Trait Implementations§
impl<S> Freeze for Schedule<S>
impl<S> RefUnwindSafe for Schedule<S>where
S: RefUnwindSafe,
impl<S> Send for Schedule<S>where
S: Send,
impl<S> Sync for Schedule<S>where
S: Sync,
impl<S> Unpin for Schedule<S>where
S: Unpin,
impl<S> UnwindSafe for Schedule<S>where
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)