pub struct Region { /* private fields */ }Expand description
A list of blocks.
Implementations§
Source§impl Region
impl Region
pub fn new(blocks: Blocks, parent: Option<Shared<dyn Op>>) -> Self
pub fn blocks(&self) -> Blocks
pub fn block(&self, index: usize) -> Shared<Block>
pub fn parent(&self) -> Option<Shared<dyn Op>>
pub fn ops(&self) -> Vec<Shared<dyn Op>> ⓘ
Sourcepub fn index_of(&self, block: &Block) -> Option<usize>
pub fn index_of(&self, block: &Block) -> Option<usize>
Return the index of block in self.
Returns None if block is not found in self.
pub fn set_blocks(&mut self, blocks: Blocks)
pub fn add_empty_block(&self) -> UnsetBlock
pub fn add_empty_block_before(&self, block: Shared<Block>) -> UnsetBlock
pub fn set_parent(&mut self, parent: Option<Shared<dyn Op>>)
pub fn refresh_names(&self)
pub fn display(&self, f: &mut Formatter<'_>, indent: i32) -> Result
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Region
impl !UnwindSafe for Region
impl Freeze for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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