pub enum BasicBlock<'blk> {
Show 16 variants
Undefined,
Root(&'blk BlockRoot<'blk>),
Module(&'blk BlockModule<'blk>),
Func(&'blk BlockFunc<'blk>),
Call(&'blk BlockCall<'blk>),
Enum(&'blk BlockEnum<'blk>),
Class(&'blk BlockClass<'blk>),
Trait(&'blk BlockTrait<'blk>),
Interface(&'blk BlockInterface<'blk>),
Impl(&'blk BlockImpl<'blk>),
Const(&'blk BlockConst<'blk>),
Field(&'blk BlockField<'blk>),
Parameter(&'blk BlockParameter<'blk>),
Return(&'blk BlockReturn<'blk>),
Alias(&'blk BlockAlias<'blk>),
Block,
}Variants§
Undefined
Root(&'blk BlockRoot<'blk>)
Module(&'blk BlockModule<'blk>)
Func(&'blk BlockFunc<'blk>)
Call(&'blk BlockCall<'blk>)
Enum(&'blk BlockEnum<'blk>)
Class(&'blk BlockClass<'blk>)
Trait(&'blk BlockTrait<'blk>)
Interface(&'blk BlockInterface<'blk>)
Impl(&'blk BlockImpl<'blk>)
Const(&'blk BlockConst<'blk>)
Field(&'blk BlockField<'blk>)
Parameter(&'blk BlockParameter<'blk>)
Return(&'blk BlockReturn<'blk>)
Alias(&'blk BlockAlias<'blk>)
Block
Implementations§
Source§impl<'blk> BasicBlock<'blk>
impl<'blk> BasicBlock<'blk>
Sourcepub fn format_block(&self, unit: CompileUnit<'blk>) -> String
pub fn format_block(&self, unit: CompileUnit<'blk>) -> String
Format the block label (content inside the parentheses) Delegates to each block type’s format method
Sourcepub fn format_deps(&self, unit: CompileUnit<'blk>) -> Vec<String>
pub fn format_deps(&self, unit: CompileUnit<'blk>) -> Vec<String>
Format extra entries for dependencies (rendered as pseudo-children) Only applicable to Func and Class blocks, returns empty for others
Sourcepub fn format_suffix(&self) -> Option<String>
pub fn format_suffix(&self) -> Option<String>
Format the suffix to appear after the closing parenthesis (Currently unused - type info is now inline in format_block)
pub fn id(&self) -> BlockId
Sourcepub fn base(&self) -> Option<&BlockBase<'blk>>
pub fn base(&self) -> Option<&BlockBase<'blk>>
Get the base block information regardless of variant
pub fn opt_node(&self) -> Option<&HirNode<'blk>>
pub fn child_count(&self) -> usize
Sourcepub fn as_root(&self) -> Option<&'blk BlockRoot<'blk>>
pub fn as_root(&self) -> Option<&'blk BlockRoot<'blk>>
Get the inner BlockRoot if this is a Root block
Sourcepub fn as_module(&self) -> Option<&'blk BlockModule<'blk>>
pub fn as_module(&self) -> Option<&'blk BlockModule<'blk>>
Get the inner BlockModule if this is a Module block
Sourcepub fn as_func(&self) -> Option<&'blk BlockFunc<'blk>>
pub fn as_func(&self) -> Option<&'blk BlockFunc<'blk>>
Get the inner BlockFunc if this is a Func or Method block
Sourcepub fn as_class(&self) -> Option<&'blk BlockClass<'blk>>
pub fn as_class(&self) -> Option<&'blk BlockClass<'blk>>
Get the inner BlockClass if this is a Class block
Sourcepub fn as_trait(&self) -> Option<&'blk BlockTrait<'blk>>
pub fn as_trait(&self) -> Option<&'blk BlockTrait<'blk>>
Get the inner BlockTrait if this is a Trait block
Sourcepub fn as_interface(&self) -> Option<&'blk BlockInterface<'blk>>
pub fn as_interface(&self) -> Option<&'blk BlockInterface<'blk>>
Get the inner BlockInterface if this is an Interface block
Sourcepub fn as_impl(&self) -> Option<&'blk BlockImpl<'blk>>
pub fn as_impl(&self) -> Option<&'blk BlockImpl<'blk>>
Get the inner BlockImpl if this is an Impl block
Sourcepub fn as_enum(&self) -> Option<&'blk BlockEnum<'blk>>
pub fn as_enum(&self) -> Option<&'blk BlockEnum<'blk>>
Get the inner BlockEnum if this is an Enum block
Sourcepub fn as_field(&self) -> Option<&'blk BlockField<'blk>>
pub fn as_field(&self) -> Option<&'blk BlockField<'blk>>
Get the inner BlockField if this is a Field block
Trait Implementations§
Source§impl<'a> ArenaInsert<'a> for BasicBlock<'a>
impl<'a> ArenaInsert<'a> for BasicBlock<'a>
fn insert_into(self, arena: &'a ArenaInner) -> &'a Self
Source§impl<'a> ArenaInsertWithId<'a> for BasicBlock<'a>
impl<'a> ArenaInsertWithId<'a> for BasicBlock<'a>
fn insert_with_id(self, arena: &'a ArenaInner, id: usize) -> &'a Self
Source§impl<'blk> Clone for BasicBlock<'blk>
impl<'blk> Clone for BasicBlock<'blk>
Source§fn clone(&self) -> BasicBlock<'blk>
fn clone(&self) -> BasicBlock<'blk>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'blk> Freeze for BasicBlock<'blk>
impl<'blk> !RefUnwindSafe for BasicBlock<'blk>
impl<'blk> Send for BasicBlock<'blk>
impl<'blk> Sync for BasicBlock<'blk>
impl<'blk> Unpin for BasicBlock<'blk>
impl<'blk> !UnwindSafe for BasicBlock<'blk>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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