pub struct Region { /* private fields */ }
Expand description
Represents a region in the control-flow graph.
Implementations§
Source§impl Region
impl Region
Sourcepub fn new(id: RegionId) -> Self
pub fn new(id: RegionId) -> Self
Creates a new region with the specified type and initializes with no statements.
§Arguments
id
- The id of the region.
Sourcepub fn region_type(&self) -> &RegionType
pub fn region_type(&self) -> &RegionType
Returns the type of the region.
Sourcepub fn iter_statements(&self) -> Iter<'_, AstKind>
pub fn iter_statements(&self) -> Iter<'_, AstKind>
Returns an iterator over the statements in the region.
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Region
Allows iterating over the statements in a region.
impl<'a> IntoIterator for &'a Region
Allows iterating over the statements in a region.
Source§impl<'a> IntoIterator for &'a mut Region
Allows iterating over the statements in a region (mutable).
impl<'a> IntoIterator for &'a mut Region
Allows iterating over the statements in a region (mutable).
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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