pub struct Slots { /* private fields */ }Expand description
The slots, and the index of what each reads, writes and computes.
Implementations§
Source§impl Slots
impl Slots
pub fn new(ops: Vec<Op>) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn slot(&self, i: usize) -> Option<&Op>
pub fn get(&self, i: usize) -> &Op
pub fn get_mut(&mut self, i: usize) -> &mut Op
pub fn take(&mut self, i: usize) -> Option<Op>
pub fn put(&mut self, i: usize, op: Op)
Sourcepub fn insert(&mut self, i: usize, op: Op)
pub fn insert(&mut self, i: usize, op: Op)
A new slot at i, every slot from i on moved one along.
pub fn live(&self) -> impl Iterator<Item = (usize, &Op)>
pub fn into_ops(self) -> Vec<Op>
Sourcepub fn producer(&self, t: &str) -> Option<usize>
pub fn producer(&self, t: &str) -> Option<usize>
The slot that computes t whole into its own buffer.
Sourcepub fn maker(&self, t: &str) -> Option<usize>
pub fn maker(&self, t: &str) -> Option<usize>
The slot that writes t whole: as its result, or as a result it keeps beside it.
Sourcepub fn untouched(
&self,
t: &str,
from: usize,
to: usize,
reads: bool,
skip: &[usize],
) -> bool
pub fn untouched( &self, t: &str, from: usize, to: usize, reads: bool, skip: &[usize], ) -> bool
Whether no live slot strictly between from and to, but those of skip, writes t (reads too when asked).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Slots
impl !RefUnwindSafe for Slots
impl Send for Slots
impl !Sync for Slots
impl Unpin for Slots
impl UnsafeUnpin for Slots
impl UnwindSafe for Slots
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.