[][src]Struct rendy_chain::Queue

pub struct Queue<S> { /* fields omitted */ }

Instances of this type contains array of Submissions. Those submissions are expected to be submitted in order.

Methods

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]

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]

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

impl<S: Clone> Clone for Queue<S>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for Queue<S>[src]

Auto Trait Implementations

impl<S> Send for Queue<S> where
    S: Send

impl<S> Sync for Queue<S> where
    S: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Supports for T[src]