[][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]

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

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

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

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

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Supports<T> for T[src]