[−][src]Struct rendy_chain::Queue
Instances of this type contains array of Submission
s.
Those submissions are expected to be submitted in order.
Implementations
impl<S> Queue<S>
[src][−]
pub fn new(id: QueueId) -> Self
[src][−]
Create new queue with specified id.
pub fn id(&self) -> QueueId
[src][−]
Get id of the queue.
pub fn iter(&self) -> impl Iterator<Item = &Submission<S>>
[src][−]
Iterate over immutable references to each submission in this queue
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Submission<S>>
[src][−]
Iterate over mutable references to each submission in this queue
pub fn len(&self) -> usize
[src][−]
Get the number of submissions in queue.
pub fn submission(&self, sid: SubmissionId) -> Option<&Submission<S>>
[src][−]
Get reference to Submission
instance by id.
Panic
This function will panic if requested submission isn't part of this queue.
pub fn submission_mut(
&mut self,
sid: SubmissionId
) -> Option<&mut Submission<S>>
[src][−]
&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.
pub fn add_submission(
&mut self,
node: usize,
wait_factor: usize,
submit_order: usize,
sync: S
) -> SubmissionId
[src][−]
&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.
pub fn add_submission_checked(&mut self, submission: Submission<S>)
[src][−]
Add Submission
instance to the end of queue.
Check that submission has correct id.
Trait Implementations
Auto Trait Implementations
impl<S> RefUnwindSafe for Queue<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for Queue<S> where
S: Send,
S: Send,
impl<S> Sync for Queue<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Queue<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Queue<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,