pub struct Queue<S> { /* private fields */ }
Expand description
Instances of this type contains array of Submission
s.
Those submissions are expected to be submitted in order.
Implementations§
Source§impl<S> Queue<S>
impl<S> Queue<S>
Sourcepub fn iter(&self) -> impl Iterator<Item = &Submission<S>>
pub fn iter(&self) -> impl Iterator<Item = &Submission<S>>
Iterate over immutable references to each submission in this queue
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Submission<S>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Submission<S>>
Iterate over mutable references to each submission in this queue
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.
§Panic
This function will panic if requested submission isn’t part of this queue.
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 mutable reference to Submission
instance by id.
§Panic
This function will panic if requested submission isn’t part of this queue.
Sourcepub fn add_submission(
&mut self,
node: usize,
wait_factor: usize,
submit_order: usize,
sync: S,
) -> SubmissionId
pub fn add_submission( &mut self, node: usize, wait_factor: usize, submit_order: usize, sync: S, ) -> SubmissionId
Add Submission
instance to the end of queue.
Returns id of the added submission.
Sourcepub fn add_submission_checked(&mut self, submission: Submission<S>)
pub fn add_submission_checked(&mut self, submission: Submission<S>)
Add Submission
instance to the end of queue.
Check that submission has correct id.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Queue<S>
impl<S> RefUnwindSafe for Queue<S>where
S: RefUnwindSafe,
impl<S> Send for Queue<S>where
S: Send,
impl<S> Sync for Queue<S>where
S: Sync,
impl<S> Unpin for Queue<S>where
S: Unpin,
impl<S> UnwindSafe for Queue<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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)