Skip to main content

DenseTransferSchedule

Struct DenseTransferSchedule 

Source
pub struct DenseTransferSchedule<T> { /* private fields */ }
Expand description

Ordered bounded transfer cursor used by dense streamed execution.

Implementations§

Source§

impl<T> DenseTransferSchedule<T>

Source

pub fn new( pending: impl IntoIterator<Item = usize>, capacity: usize, ) -> Result<Self, DenseTransferScheduleError>

Creates a cursor over the remaining unit indices.

Source

pub fn has_ready(&self) -> bool

Returns whether at least one submitted transfer is ready for consumption.

Source

pub fn is_exhausted(&self) -> bool

Returns whether no ready or pending units remain.

Source

pub fn can_admit(&self) -> bool

Returns whether another transfer may be admitted into the bounded ready window.

Source

pub fn next_pending(&self) -> Option<usize>

Returns the next unit which must be submitted.

Source

pub fn desired_indices(&self, lookahead: usize) -> Vec<usize>

Returns the current ready indices followed by future indices, truncated to lookahead.

Source

pub fn admit( &mut self, index: usize, transfer: T, ) -> Result<(), DenseTransferScheduleError>

Commits one successfully submitted transfer in exact pending order.

Source

pub fn pop_ready(&mut self) -> Option<(usize, T)>

Removes the oldest ready transfer for execution.

Trait Implementations§

Source§

impl<T: Debug> Debug for DenseTransferSchedule<T>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.