pub struct Block { /* private fields */ }Expand description
Represents a basic block in the IR.
Basic blocks are used in SSA regions to provide the structure of the control-flow graph. Operations within a basic block appear in the order they will be executed.
A block must have a traits::Terminator, an operation which transfers control to another block in the same region, or out of the containing operation (e.g. returning from a function).
Blocks have predecessors and successors, representing the inbound and outbound edges (respectively) formed by operations that transfer control between blocks. A block can have zero or more predecessors and/or successors. A well-formed region will generally only have a single block (the entry block) with no predecessors (i.e. no unreachable blocks), and no blocks with both multiple predecessors and multiple successors (i.e. no critical edges). It is valid to have both unreachable blocks and critical edges in the IR, but they must be removed during the course of compilation.
Implementations§
Source§impl Block
impl Block
pub fn new(id: BlockId) -> Self
pub fn as_block_ref(&self) -> BlockRef
Sourcepub fn parent(&self) -> Option<RegionRef>
pub fn parent(&self) -> Option<RegionRef>
Get a handle to the containing Region of this block, if it is attached to one
Sourcepub fn parent_op(&self) -> Option<OperationRef>
pub fn parent_op(&self) -> Option<OperationRef>
Get a handle to the containing Operation of this block, if it is attached to one
Sourcepub fn parent_block(&self) -> Option<BlockRef>
pub fn parent_block(&self) -> Option<BlockRef>
Get a handle to the ancestor Block of this block, if one is present
Sourcepub fn is_entry_block(&self) -> bool
pub fn is_entry_block(&self) -> bool
Returns true if this block is the entry block for its containing region
Sourcepub fn front(&self) -> Option<OperationRef>
pub fn front(&self) -> Option<OperationRef>
Get the first operation in the body of this block
Sourcepub fn back(&self) -> Option<OperationRef>
pub fn back(&self) -> Option<OperationRef>
Get the last operation in the body of this block
Source§impl Block
Arguments
impl Block
Arguments
pub fn has_arguments(&self) -> bool
pub fn num_arguments(&self) -> usize
pub fn arguments(&self) -> &[BlockArgumentRef] ⓘ
pub fn arguments_mut(&mut self) -> &mut Vec<BlockArgumentRef> ⓘ
pub fn argument_values(&self) -> impl ExactSizeIterator<Item = ValueRef> + '_
pub fn argument_types(&self) -> impl ExactSizeIterator<Item = Type> + '_
pub fn get_argument(&self, index: usize) -> BlockArgumentRef
Sourcepub fn erase_argument(&mut self, index: usize)
pub fn erase_argument(&mut self, index: usize)
Erase the block argument at index
Panics if the argument still has uses.
Sourcepub fn erase_arguments<F>(&mut self, should_erase: F)
pub fn erase_arguments<F>(&mut self, should_erase: F)
Erase every parameter of this block for which should_erase returns true.
Panics if any argument to be erased still has uses.
pub fn erase(&mut self)
Source§impl Block
Placement
impl Block
Placement
Sourcepub fn insert_after(&mut self, after: BlockRef)
pub fn insert_after(&mut self, after: BlockRef)
Insert this block after after in its containing region.
Panics if this block is already attached to a region, or if after is not attached.
Sourcepub fn insert_before(&mut self, before: BlockRef)
pub fn insert_before(&mut self, before: BlockRef)
Insert this block before before in its containing region.
Panics if this block is already attached to a region, or if before is not attached.
Sourcepub fn insert_at_end(&mut self, region: RegionRef)
pub fn insert_at_end(&mut self, region: RegionRef)
Insert this block at the end of region.
Panics if this block is already attached to a region.
Sourcepub fn move_before(&mut self, before: BlockRef)
pub fn move_before(&mut self, before: BlockRef)
Unlink this block from its current region and insert it right before before
Sourcepub fn splice_block(&mut self, block: &mut Self)
pub fn splice_block(&mut self, block: &mut Self)
Splice the body of block to the end of self, updating the parent of all spliced ops.
It is up to the caller to ensure that this operation produces valid IR.
Sourcepub fn splice_block_before(&mut self, block: &mut Self, ip: OperationRef)
pub fn splice_block_before(&mut self, block: &mut Self, ip: OperationRef)
Splice the body of block to self before ip, updating the parent of all spliced ops.
It is up to the caller to ensure that this operation produces valid IR.
Sourcepub fn splice_block_after(&mut self, block: &mut Self, ip: OperationRef)
pub fn splice_block_after(&mut self, block: &mut Self, ip: OperationRef)
Splice the body of block to self after ip, updating the parent of all spliced ops.
It is up to the caller to ensure that this operation produces valid IR.
Sourcepub fn split_block(&mut self, before: OperationRef) -> BlockRef
pub fn split_block(&mut self, before: OperationRef) -> BlockRef
Split this block into two blocks before the specified operation
Note that all operations in the block prior to before stay as part of the original block,
and the rest are moved to the new block, including the old terminator. The original block is
thus left without a terminator.
Returns the newly created block.
pub fn clear(&mut self)
Source§impl Block
Ancestors
impl Block
Ancestors
pub fn is_legal_to_hoist_into(&self) -> bool
pub fn has_ssa_dominance(&self) -> bool
Sourcepub fn traverse_ancestors<F>(block: BlockRef, f: F) -> Option<BlockRef>
pub fn traverse_ancestors<F>(block: BlockRef, f: F) -> Option<BlockRef>
Walk up the ancestor blocks of block, until f returns true for a block.
NOTE: block is visited before any of its ancestors.
Sourcepub fn get_blocks_in_same_region(
a: BlockRef,
b: BlockRef,
) -> Option<(BlockRef, BlockRef)>
pub fn get_blocks_in_same_region( a: BlockRef, b: BlockRef, ) -> Option<(BlockRef, BlockRef)>
Try to get a pair of blocks, starting with the given pair, which live in the same region, by exploring the relationships of both blocks with respect to their regions.
The returned block pair will either be the same input blocks, or some combination of those blocks or their ancestors.
Source§impl Block
Predecessors and Successors
impl Block
Predecessors and Successors
Sourcepub fn has_predecessors(&self) -> bool
pub fn has_predecessors(&self) -> bool
Returns true if this block has predecessors
Sourcepub fn predecessors(&self) -> EntityIter<'_, BlockOperand> ⓘ
pub fn predecessors(&self) -> EntityIter<'_, BlockOperand> ⓘ
Get an iterator over the predecessors of this block
Sourcepub fn get_single_predecessor(&self) -> Option<BlockRef>
pub fn get_single_predecessor(&self) -> Option<BlockRef>
If this block has exactly one predecessor, return it, otherwise None
NOTE: A predecessor block with multiple edges, e.g. a conditional branch that has this block as the destination for both true/false branches is not considered a single predecessor by this function.
Sourcepub fn get_unique_predecessor(&self) -> Option<BlockRef>
pub fn get_unique_predecessor(&self) -> Option<BlockRef>
If this block has a unique predecessor, i.e. all incoming edges originate from one block,
return it, otherwise None
Sourcepub fn has_successors(&self) -> bool
pub fn has_successors(&self) -> bool
Returns true if this block has any successors
Sourcepub fn num_successors(&self) -> usize
pub fn num_successors(&self) -> usize
Get the number of successors of this block in the CFG
Sourcepub fn get_successor(&self, index: usize) -> BlockRef
pub fn get_successor(&self, index: usize) -> BlockRef
Get the indexth successor of this block’s terminator operation
Sourcepub fn drop_all_references(&mut self)
pub fn drop_all_references(&mut self)
This drops all operand uses from operations within this block, which is an essential step in breaking cyclic dependences between references when they are to be deleted.
Sourcepub fn drop_all_defined_value_uses(&mut self)
pub fn drop_all_defined_value_uses(&mut self)
This drops all uses of values defined in this block or in the blocks of nested regions wherever the uses are located.
Sourcepub fn drop_all_uses(&mut self)
pub fn drop_all_uses(&mut self)
Drop all uses of this block via BlockOperand
pub fn replace_all_uses_with(&mut self, replacement: BlockRef)
Sourcepub fn terminator(&self) -> Option<OperationRef>
pub fn terminator(&self) -> Option<OperationRef>
Get the terminator operation of this block, or None if the block does not have one.
Sourcepub fn has_terminator(&self) -> bool
pub fn has_terminator(&self) -> bool
Returns true if this block has a terminator
Trait Implementations§
Source§impl Dominates for Block
The dominance relationship between two blocks.
impl Dominates for Block
The dominance relationship between two blocks.
Source§fn dominates(&self, other: &Self, dom_info: &DominanceInfo) -> bool
fn dominates(&self, other: &Self, dom_info: &DominanceInfo) -> bool
Returns true if a == b or a properly dominates b.
Source§fn properly_dominates(&self, other: &Self, dom_info: &DominanceInfo) -> bool
fn properly_dominates(&self, other: &Self, dom_info: &DominanceInfo) -> bool
Returns true if a != b and:
ais an ancestor ofb- The region containing
aalso containsbor some ancestor ofb, andadominates that block in that kind of region. - In SSA regions,
aproperly dominatesbif all control flow paths from the entry block tob, flow througha. - In graph regions, all blocks dominate all other blocks.
Source§impl EntityListItem for Block
impl EntityListItem for Block
Source§fn on_inserted(
this: UnsafeIntrusiveEntityRef<Self>,
cursor: &mut EntityCursorMut<'_, Self>,
)
fn on_inserted( this: UnsafeIntrusiveEntityRef<Self>, cursor: &mut EntityCursorMut<'_, Self>, )
Source§fn on_removed(
this: UnsafeIntrusiveEntityRef<Self>,
list: &mut EntityCursorMut<'_, Self>,
)
fn on_removed( this: UnsafeIntrusiveEntityRef<Self>, list: &mut EntityCursorMut<'_, Self>, )
Source§fn on_transfer(
this: UnsafeIntrusiveEntityRef<Self>,
from: &mut EntityList<Self>,
to: &mut EntityList<Self>,
)
fn on_transfer( this: UnsafeIntrusiveEntityRef<Self>, from: &mut EntityList<Self>, to: &mut EntityList<Self>, )
Source§impl EntityParent<Block> for Region
impl EntityParent<Block> for Region
Source§fn offset() -> usize
fn offset() -> usize
Self that is used to store
children of type Child.Source§impl EntityParent<BlockOperand> for Block
impl EntityParent<BlockOperand> for Block
Source§fn offset() -> usize
fn offset() -> usize
Self that is used to store
children of type Child.Source§impl EntityParent<Operation> for Block
impl EntityParent<Operation> for Block
Source§fn offset() -> usize
fn offset() -> usize
Self that is used to store
children of type Child.Source§impl EntityWithParent for Block
impl EntityWithParent for Block
Source§impl From<&Block> for ProgramPoint
Construct a ProgramPoint referring to the point at entry to block
impl From<&Block> for ProgramPoint
Construct a ProgramPoint referring to the point at entry to block
Source§impl Graph for Block
impl Graph for Block
Source§type ChildEdgeIter = BlockSuccessorEdgesIter
type ChildEdgeIter = BlockSuccessorEdgesIter
Source§type ChildIter = BlockSuccessorIter
type ChildIter = BlockSuccessorIter
Source§type Edge = RawEntityRef<BlockOperand, IntrusiveLink>
type Edge = RawEntityRef<BlockOperand, IntrusiveLink>
Source§type Node = RawEntityRef<Block, IntrusiveLink>
type Node = RawEntityRef<Block, IntrusiveLink>
Source§fn entry_node(&self) -> Self::Node
fn entry_node(&self) -> Self::Node
Source§fn children(parent: Self::Node) -> Self::ChildIter
fn children(parent: Self::Node) -> Self::ChildIter
parentSource§fn children_edges(parent: Self::Node) -> Self::ChildEdgeIter
fn children_edges(parent: Self::Node) -> Self::ChildEdgeIter
parentSource§impl<'a> InvertibleGraph for &'a Block
impl<'a> InvertibleGraph for &'a Block
Source§type InvertibleChildEdgeIter = BlockPredecessorEdgesIter
type InvertibleChildEdgeIter = BlockPredecessorEdgesIter
Source§type InvertibleChildIter = BlockPredecessorIter
type InvertibleChildIter = BlockPredecessorIter
Source§fn inverse_children(parent: Self::Node) -> Self::InvertibleChildIter
fn inverse_children(parent: Self::Node) -> Self::InvertibleChildIter
parent. Read moreSource§fn inverse_children_edges(parent: Self::Node) -> Self::InvertibleChildEdgeIter
fn inverse_children_edges(parent: Self::Node) -> Self::InvertibleChildEdgeIter
parent.Source§impl PostDominates for Block
The post-dominance relationship between two blocks.
impl PostDominates for Block
The post-dominance relationship between two blocks.
Source§fn properly_post_dominates(
&self,
other: &Self,
dom_info: &PostDominanceInfo,
) -> bool
fn properly_post_dominates( &self, other: &Self, dom_info: &PostDominanceInfo, ) -> bool
Returns true if a != b and:
ais an ancestor ofb- The region containing
aalso containsbor some ancestor ofb, andadominates that block in that kind of region. - In SSA regions,
aproperly post-dominatesbif all control flow paths frombto an exit node, flow througha. - In graph regions, all blocks post-dominate all other blocks.
Source§fn post_dominates(&self, other: &Self, dom_info: &PostDominanceInfo) -> bool
fn post_dominates(&self, other: &Self, dom_info: &PostDominanceInfo) -> bool
Source§impl PrettyPrint for Block
impl PrettyPrint for Block
Source§fn to_pretty_string(&self) -> String
fn to_pretty_string(&self) -> String
Source§fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§impl Usable for Block
impl Usable for Block
Source§type Use = BlockOperand
type Use = BlockOperand
OpOperandSource§fn uses(&self) -> &EntityList<BlockOperand>
fn uses(&self) -> &EntityList<BlockOperand>
Source§fn uses_mut(&mut self) -> &mut EntityList<BlockOperand>
fn uses_mut(&mut self) -> &mut EntityList<BlockOperand>
Source§fn iter_uses(&self) -> EntityIter<'_, Self::Use> ⓘ
fn iter_uses(&self) -> EntityIter<'_, Self::Use> ⓘ
Source§fn first_use(&self) -> EntityCursor<'_, Self::Use>
fn first_use(&self) -> EntityCursor<'_, Self::Use>
Source§fn first_use_mut(&mut self) -> EntityCursorMut<'_, Self::Use>
fn first_use_mut(&mut self) -> EntityCursorMut<'_, Self::Use>
Source§fn insert_use(&mut self, user: UnsafeIntrusiveEntityRef<Self::Use>)
fn insert_use(&mut self, user: UnsafeIntrusiveEntityRef<Self::Use>)
user to the set of uses of this definitionimpl Entity for Block
impl Eq for Block
Auto Trait Implementations§
impl !Freeze for Block
impl !RefUnwindSafe for Block
impl !Send for Block
impl !Sync for Block
impl Unpin for Block
impl !UnwindSafe for Block
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> DynPartialEq for Twhere
T: PartialEq + 'static,
impl<T> DynPartialEq for Twhere
T: PartialEq + 'static,
default fn dyn_eq(&self, rhs: &(dyn DynPartialEq + 'static)) -> bool
Source§impl<T> EntityListItem for Twhere
T: Entity,
impl<T> EntityListItem for Twhere
T: Entity,
Source§default fn on_inserted(
_this: RawEntityRef<T, IntrusiveLink>,
_list: &mut EntityCursorMut<'_, T>,
)
default fn on_inserted( _this: RawEntityRef<T, IntrusiveLink>, _list: &mut EntityCursorMut<'_, T>, )
Source§default fn on_removed(
_this: RawEntityRef<T, IntrusiveLink>,
_list: &mut EntityCursorMut<'_, T>,
)
default fn on_removed( _this: RawEntityRef<T, IntrusiveLink>, _list: &mut EntityCursorMut<'_, T>, )
Source§default fn on_transfer(
_this: RawEntityRef<T, IntrusiveLink>,
_from: &mut EntityList<T>,
_to: &mut EntityList<T>,
)
default fn on_transfer( _this: RawEntityRef<T, IntrusiveLink>, _from: &mut EntityList<T>, _to: &mut EntityList<T>, )
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T> PassTarget for Twhere
T: 'static,
impl<T> PassTarget for Twhere
T: 'static,
default fn target_name(_context: &Context) -> Option<OperationName>
default fn into_target( op: &RawEntityRef<Operation, IntrusiveLink>, ) -> EntityRef<'_, T>
default fn into_target_mut( op: &mut RawEntityRef<Operation, IntrusiveLink>, ) -> EntityMut<'_, T>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T, Trait> Verifier<Trait> for Twhere
Trait: ?Sized,
impl<T, Trait> Verifier<Trait> for Twhere
Trait: ?Sized,
Source§const VACUOUS: bool = true
const VACUOUS: bool = true
Verifier sets this flag to true when its implementation is vacuous,
i.e. it always succeeds and is not dependent on runtime context. Read moreSource§default fn should_verify(&self, _context: &Context) -> bool
default fn should_verify(&self, _context: &Context) -> bool
Source§default fn maybe_verify(&self, _context: &Context) -> Result<(), Report>
default fn maybe_verify(&self, _context: &Context) -> Result<(), Report>
true