pub struct Operation<'a> { /* private fields */ }Expand description
Operation in a dataflow graph.
Implementations§
Source§impl<'a> Operation<'a>
impl<'a> Operation<'a>
Sourcepub fn boundary(
&self,
direction: Direction,
) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
pub fn boundary( &self, direction: Direction, ) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
Returns an iterator over the input or output values of this operation.
§Errors
ReadError::ValueOutOfBoundsif an encoded value references an invalid index in the value table.
Sourcepub fn inputs(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
pub fn inputs(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
Return an iterator over the input values of this operation.
§Errors
ReadError::ValueOutOfBoundsif an encoded value references an invalid index in the value table.
Sourcepub fn outputs(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
pub fn outputs(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
Return an iterator over the output values of this operation.
§Errors
ReadError::ValueOutOfBoundsif an encoded value references an invalid index in the value table.
Sourcepub fn boundary_count(&self, direction: Direction) -> usize
pub fn boundary_count(&self, direction: Direction) -> usize
Returns the number of inputs or output values in this operation.
Sourcepub fn input_count(&self) -> usize
pub fn input_count(&self) -> usize
Returns the number of input values in this operation.
Sourcepub fn output_count(&self) -> usize
pub fn output_count(&self) -> usize
Returns the number of output values in this operation.
Sourcepub fn boundary_value(
&self,
direction: Direction,
idx: usize,
) -> Option<Result<WireValue<'a>, ReadError>>
pub fn boundary_value( &self, direction: Direction, idx: usize, ) -> Option<Result<WireValue<'a>, ReadError>>
Returns the boundary value at the given index, or None if the index is
out of bounds.
§Errors
ReadError::ValueOutOfBoundsif the encoded value references an invalid index in the value table.
Sourcepub fn input(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
pub fn input(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
Returns the input value at the given index, or None if the index is
out of bounds.
§Errors
ReadError::ValueOutOfBoundsif the encoded value references an invalid index in the value table.
Sourcepub fn output(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
pub fn output(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
Returns the output value at the given index, or None if the index is
out of bounds.
§Errors
ReadError::ValueOutOfBoundsif the encoded value references an invalid index in the value table.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Operation<'a>
impl<'a> !Send for Operation<'a>
impl<'a> !Sync for Operation<'a>
impl<'a> !UnwindSafe for Operation<'a>
impl<'a> Freeze for Operation<'a>
impl<'a> Unpin for Operation<'a>
impl<'a> UnsafeUnpin for Operation<'a>
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more