rendy_chain

Struct Schedule

Source
pub struct Schedule<S> { /* private fields */ }
Expand description

Whole passes schedule.

Implementations§

Source§

impl<S> Schedule<S>

Source

pub fn new() -> Self

Create new empty Schedule

Source

pub fn total(&self) -> usize

Get total number of submissions.

Source

pub fn ordered(&self) -> impl Iterator<Item = &Submission<S>>

Iterate over submissions in ordered they must be submitted.

Source

pub fn family_count(&self) -> usize

The number of families in this schedule.

Source

pub fn queue_count(&self) -> usize

The number of queues in this schedule.

Source

pub fn iter(&self) -> impl Iterator<Item = &Family<S>>

Iterate over immutable references to families in this schedule.

Source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Family<S>>

Iterate over mutable references to families in this schedule

Source

pub fn family(&self, fid: QueueFamilyId) -> Option<&Family<S>>

Get reference to Family instance by the id.

Source

pub fn family_mut(&mut self, fid: QueueFamilyId) -> Option<&mut Family<S>>

Get mutable reference to Family instance by the id.

Source

pub fn queue(&self, qid: QueueId) -> Option<&Queue<S>>

Get reference to Queue instance by the id.

Source

pub fn queue_mut(&mut self, qid: QueueId) -> Option<&mut Queue<S>>

Get mutable reference to Queue instance by the id.

Source

pub fn submission(&self, sid: SubmissionId) -> Option<&Submission<S>>

Get reference to Submission instance by id.

Source

pub fn submission_mut( &mut self, sid: SubmissionId, ) -> Option<&mut Submission<S>>

Get reference to Submission instance by id.

Source

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.

Source

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.

Source

pub fn build_order(&mut self)

Make ordered.

Trait Implementations§

Source§

impl<S: Clone> Clone for Schedule<S>

Source§

fn clone(&self) -> Schedule<S>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug> Debug for Schedule<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S> Index<QueueId> for Schedule<S>

Source§

type Output = Queue<S>

The returned type after indexing.
Source§

fn index(&self, qid: QueueId) -> &Queue<S>

Performs the indexing (container[index]) operation. Read more
Source§

impl<S> Index<SubmissionId> for Schedule<S>

Source§

type Output = Submission<S>

The returned type after indexing.
Source§

fn index(&self, sid: SubmissionId) -> &Submission<S>

Performs the indexing (container[index]) operation. Read more
Source§

impl<S> IndexMut<QueueId> for Schedule<S>

Source§

fn index_mut(&mut self, qid: QueueId) -> &mut Queue<S>

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<S> IndexMut<SubmissionId> for Schedule<S>

Source§

fn index_mut(&mut self, sid: SubmissionId) -> &mut Submission<S>

Performs the mutable indexing (container[index]) operation. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.