pub struct Region<'a> { /* private fields */ }Expand description
Dataflow region defined in a jeff module.
Implementations§
Source§impl<'a> Region<'a>
impl<'a> Region<'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 sources or target values of this region.
§Errors
ReadError::ValueOutOfBoundsif an encoded value references an invalid index in the value table.
Sourcepub fn sources(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
pub fn sources(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
Return an iterator over the source values of this region.
§Errors
ReadError::ValueOutOfBoundsif an encoded value references an invalid index in the value table.
Sourcepub fn targets(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
pub fn targets(&self) -> impl Iterator<Item = Result<WireValue<'a>, ReadError>>
Return an iterator over the target values of this region.
§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 sources or target values in this region.
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Returns the number of source values in this region.
Sourcepub fn target_count(&self) -> usize
pub fn target_count(&self) -> usize
Returns the number of target values in this region.
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 source(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
pub fn source(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
Returns the source 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 target(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
pub fn target(&self, idx: usize) -> Option<Result<WireValue<'a>, ReadError>>
Returns the target 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 operations(&self) -> impl Iterator<Item = Operation<'a>>
pub fn operations(&self) -> impl Iterator<Item = Operation<'a>>
Returns an iterator over the operations in this region.
Sourcepub fn operation_count(&self) -> usize
pub fn operation_count(&self) -> usize
Returns the number of operations in this region.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Region<'a>
impl<'a> !Send for Region<'a>
impl<'a> !Sync for Region<'a>
impl<'a> !UnwindSafe for Region<'a>
impl<'a> Freeze for Region<'a>
impl<'a> Unpin for Region<'a>
impl<'a> UnsafeUnpin for Region<'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