pub struct MastForest { /* private fields */ }Expand description
Represents one or more procedures, represented as a collection of MastNodes.
A MastForest does not have an entrypoint, and hence is not executable. A
crate::program::Program can be built from a MastForest to specify an entrypoint.
Implementations§
Source§impl MastForest
Constructors
impl MastForest
Constructors
Sourcepub fn new() -> MastForest
pub fn new() -> MastForest
Creates a new empty MastForest.
Source§impl MastForest
State mutators
impl MastForest
State mutators
Sourcepub fn make_root(&mut self, new_root_id: MastNodeId)
pub fn make_root(&mut self, new_root_id: MastNodeId)
Marks the given MastNodeId as being the root of a procedure.
If the specified node is already marked as a root, this will have no effect.
§Panics
- if
new_root_id’s internal index is larger than the number of nodes in this forest (i.e. clearly doesn’t belong to this MAST forest).
Sourcepub fn remove_nodes(
&mut self,
nodes_to_remove: &BTreeSet<MastNodeId>,
) -> BTreeMap<MastNodeId, MastNodeId>
pub fn remove_nodes( &mut self, nodes_to_remove: &BTreeSet<MastNodeId>, ) -> BTreeMap<MastNodeId, MastNodeId>
Removes all nodes in the provided set from the MAST forest. The nodes MUST be orphaned (i.e.
have no parent). Otherwise, this parent’s reference is considered “dangling” after the
removal (i.e. will point to an incorrect node after the removal), and this removal operation
would result in an invalid MastForest.
It also returns the map from old node IDs to new node IDs. Any MastNodeId used in
reference to the old MastForest should be remapped using this map.
Sourcepub fn clear_debug_info(&mut self)
pub fn clear_debug_info(&mut self)
Clears all DebugInfo from this forest: decorators, error codes, and procedure names.
let mut forest = MastForest::new();
forest.clear_debug_info();
assert!(forest.decorators().is_empty());Sourcepub fn compact(self) -> (MastForest, MastForestRootMap)
pub fn compact(self) -> (MastForest, MastForestRootMap)
Compacts the forest by merging duplicate nodes.
This operation performs node deduplication by merging the forest with itself. The method assumes that debug info has already been cleared if that is desired. This method consumes the forest and returns a new compacted forest.
The process works by:
- Merging the forest with itself to deduplicate identical nodes
- Updating internal node references and remappings
- Returning the compacted forest and root map
§Examples
use miden_core::mast::MastForest;
let mut forest = MastForest::new();
// Add nodes to the forest
// First clear debug info if needed
forest.clear_debug_info();
// Then compact the forest (consumes the original)
let (compacted_forest, root_map) = forest.compact();
// compacted_forest is now compacted with duplicate nodes mergedSourcepub fn merge<'forest>(
forests: impl IntoIterator<Item = &'forest MastForest>,
) -> Result<(MastForest, MastForestRootMap), MastForestError>
pub fn merge<'forest>( forests: impl IntoIterator<Item = &'forest MastForest>, ) -> Result<(MastForest, MastForestRootMap), MastForestError>
Merges all forests into a new MastForest.
Merging two forests means combining all their constituent parts, i.e. MastNodes,
Decorators and roots. During this process, any duplicate or
unreachable nodes are removed. Additionally, MastNodeIds of nodes as well as
DecoratorIds of decorators may change and references to them are remapped to their new
location.
For example, consider this representation of a forest’s nodes with all of these nodes being roots:
[Block(foo), Block(bar)]If we merge another forest into it:
[Block(bar), Call(0)]then we would expect this forest:
[Block(foo), Block(bar), Call(1)]- The
Callto thebarblock was remapped to its new index (now 1, previously 0). - The
Block(bar)was deduplicated any only exists once in the merged forest.
The function also returns a vector of MastForestRootMaps, whose length equals the number
of passed forests. The indices in the vector correspond to the ones in forests. The map
of a given forest contains the new locations of its roots in the merged forest. To
illustrate, the above example would return a vector of two maps:
vec![{0 -> 0, 1 -> 1}
{0 -> 1, 1 -> 2}]- The root locations of the original forest are unchanged.
- For the second forest, the
barblock has moved from index 0 to index 1 in the merged forest, and theCallhas moved from index 1 to 2.
If any forest being merged contains an External(qux) node and another forest contains a
node whose digest is qux, then the external node will be replaced with the qux node,
which is effectively deduplication. Decorators are ignored when it comes to merging
External nodes. This means that an External node with decorators may be replaced by a node
without decorators or vice versa.
impl MastForest
Helpers
Source§impl MastForest
Public accessors
impl MastForest
Public accessors
Sourcepub fn get_node_by_id(&self, node_id: MastNodeId) -> Option<&MastNode>
pub fn get_node_by_id(&self, node_id: MastNodeId) -> Option<&MastNode>
Returns the MastNode associated with the provided MastNodeId if valid, or else
None.
This is the fallible version of indexing (e.g. mast_forest[node_id]).
Sourcepub fn find_procedure_root(&self, digest: Word) -> Option<MastNodeId>
pub fn find_procedure_root(&self, digest: Word) -> Option<MastNodeId>
Returns the MastNodeId of the procedure associated with a given digest, if any.
Sourcepub fn is_procedure_root(&self, node_id: MastNodeId) -> bool
pub fn is_procedure_root(&self, node_id: MastNodeId) -> bool
Returns true if a node with the specified ID is a root of a procedure in this MAST forest.
Sourcepub fn procedure_digests(&self) -> impl Iterator<Item = Word>
pub fn procedure_digests(&self) -> impl Iterator<Item = Word>
Returns an iterator over the digests of all procedures in this MAST forest.
Sourcepub fn local_procedure_digests(&self) -> impl Iterator<Item = Word>
pub fn local_procedure_digests(&self) -> impl Iterator<Item = Word>
Returns an iterator over the digests of local procedures in this MAST forest.
A local procedure is defined as a procedure which is not a single external node.
Sourcepub fn procedure_roots(&self) -> &[MastNodeId]
pub fn procedure_roots(&self) -> &[MastNodeId]
Returns an iterator over the IDs of the procedures in this MAST forest.
Sourcepub fn num_procedures(&self) -> u32
pub fn num_procedures(&self) -> u32
Returns the number of procedures in this MAST forest.
Sourcepub fn compute_nodes_commitment<'a>(
&self,
node_ids: impl IntoIterator<Item = &'a MastNodeId>,
) -> Word
pub fn compute_nodes_commitment<'a>( &self, node_ids: impl IntoIterator<Item = &'a MastNodeId>, ) -> Word
Returns the Word representing the content hash of a subset of MastNodeIds.
§Panics
This function panics if any node_ids is not a node of this forest.
Sourcepub fn commitment(&self) -> Word
pub fn commitment(&self) -> Word
Returns the commitment to this MAST forest.
The commitment is computed as the sequential hash of all procedure roots in the forest. This value is cached after the first computation and reused for subsequent calls, unless the forest is mutated (in which case the cache is invalidated).
The commitment uniquely identifies the forest’s structure, as each root’s digest transitively includes all of its descendants. Therefore, a commitment to all roots is a commitment to the entire forest.
pub fn advice_map(&self) -> &AdviceMap
pub fn advice_map_mut(&mut self) -> &mut AdviceMap
Sourcepub fn write_stripped<W>(&self, target: &mut W)where
W: ByteWriter,
pub fn write_stripped<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes this MastForest without debug information.
This produces a smaller output by omitting decorators, error codes, and procedure names.
The resulting bytes can be deserialized with the standard Deserializable impl,
which auto-detects the format and creates an empty DebugInfo.
Use this for production builds where debug info is not needed.
§Example
use miden_core::{mast::MastForest, serde::Serializable};
let forest = MastForest::new();
// Full serialization (with debug info)
let full_bytes = forest.to_bytes();
// Stripped serialization (without debug info)
let mut stripped_bytes = Vec::new();
forest.write_stripped(&mut stripped_bytes);
// Both can be deserialized the same way
// let restored = MastForest::read_from_bytes(&stripped_bytes).unwrap();Source§impl MastForest
Decorator methods
impl MastForest
Decorator methods
Sourcepub fn decorators(&self) -> &[Decorator]
pub fn decorators(&self) -> &[Decorator]
Returns a list of all decorators contained in this MastForest.
Sourcepub fn decorator_by_id(&self, decorator_id: DecoratorId) -> Option<&Decorator>
pub fn decorator_by_id(&self, decorator_id: DecoratorId) -> Option<&Decorator>
Returns the Decorator associated with the provided DecoratorId if valid, or else
None.
This is the fallible version of indexing (e.g. mast_forest[decorator_id]).
Sourcepub fn decorators_for_op<'a>(
&'a self,
node_id: MastNodeId,
local_op_idx: usize,
) -> impl Iterator<Item = &'a Decorator> + 'a
pub fn decorators_for_op<'a>( &'a self, node_id: MastNodeId, local_op_idx: usize, ) -> impl Iterator<Item = &'a Decorator> + 'a
Returns an iterator over decorator references for a specific operation within a node.
This is the preferred method for accessing decorators, as it provides direct references to the decorator objects.
Sourcepub fn before_enter_decorators(&self, node_id: MastNodeId) -> &[DecoratorId]
pub fn before_enter_decorators(&self, node_id: MastNodeId) -> &[DecoratorId]
Returns the decorators to be executed before this node is executed.
Sourcepub fn after_exit_decorators(&self, node_id: MastNodeId) -> &[DecoratorId]
pub fn after_exit_decorators(&self, node_id: MastNodeId) -> &[DecoratorId]
Returns the decorators to be executed after this node is executed.
Sourcepub fn add_decorator(
&mut self,
decorator: Decorator,
) -> Result<DecoratorId, MastForestError>
pub fn add_decorator( &mut self, decorator: Decorator, ) -> Result<DecoratorId, MastForestError>
Adds a decorator to the forest, and returns the associated DecoratorId.
Sourcepub fn get_assembly_op(
&self,
node_id: MastNodeId,
target_op_idx: Option<usize>,
) -> Option<&AssemblyOp>
pub fn get_assembly_op( &self, node_id: MastNodeId, target_op_idx: Option<usize>, ) -> Option<&AssemblyOp>
Returns the AssemblyOp associated with a node.
For basic block nodes with a target_op_idx, returns the AssemblyOp for that operation.
For other nodes or when no target_op_idx is provided, returns the first AssemblyOp.
Source§impl MastForest
Validation methods
impl MastForest
Validation methods
Sourcepub fn validate(&self) -> Result<(), MastForestError>
pub fn validate(&self) -> Result<(), MastForestError>
Validates that all BasicBlockNodes in this forest satisfy the core invariants:
- Power-of-two number of groups in each batch
- No operation group ends with an operation requiring an immediate value
- The last operation group in a batch cannot contain operations requiring immediate values
- OpBatch structural consistency (num_groups <= BATCH_SIZE, group size <= GROUP_SIZE, indptr integrity, bounds checking)
This addresses the gap created by PR 2094, where padding NOOPs are now inserted at assembly time rather than dynamically during execution, and adds comprehensive structural validation to prevent deserialization-time panics.
Source§impl MastForest
Error message methods
impl MastForest
Error message methods
Sourcepub fn resolve_error_message(&self, code: Goldilocks) -> Option<Arc<str>>
pub fn resolve_error_message(&self, code: Goldilocks) -> Option<Arc<str>>
Given an error code as a Felt, resolves it to its corresponding error message.
Sourcepub fn register_error(&mut self, msg: Arc<str>) -> Goldilocks
pub fn register_error(&mut self, msg: Arc<str>) -> Goldilocks
Registers an error message in the MAST Forest and returns the corresponding error code as a Felt.
Source§impl MastForest
Procedure name methods
impl MastForest
Procedure name methods
Sourcepub fn procedure_name(&self, digest: &Word) -> Option<&str>
pub fn procedure_name(&self, digest: &Word) -> Option<&str>
Returns the procedure name for the given MAST root digest, if present.
Sourcepub fn procedure_names(&self) -> impl Iterator<Item = (Word, &Arc<str>)>
pub fn procedure_names(&self) -> impl Iterator<Item = (Word, &Arc<str>)>
Returns an iterator over all (digest, name) pairs of procedure names.
Sourcepub fn insert_procedure_name(&mut self, digest: Word, name: Arc<str>)
pub fn insert_procedure_name(&mut self, digest: Word, name: Arc<str>)
Inserts a procedure name for the given MAST root digest.
Sourcepub fn debug_info(&self) -> &DebugInfo
pub fn debug_info(&self) -> &DebugInfo
Returns a reference to the debug info for this forest.
Sourcepub fn debug_info_mut(&mut self) -> &mut DebugInfo
pub fn debug_info_mut(&mut self) -> &mut DebugInfo
Returns a mutable reference to the debug info.
This is intended for use by the assembler to register AssemblyOps and other debug information during compilation.
Trait Implementations§
Source§impl Clone for MastForest
impl Clone for MastForest
Source§fn clone(&self) -> MastForest
fn clone(&self) -> MastForest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MastForest
impl Debug for MastForest
Source§impl Default for MastForest
impl Default for MastForest
Source§fn default() -> MastForest
fn default() -> MastForest
Source§impl Deserializable for MastForest
impl Deserializable for MastForest
Source§fn read_from<R>(source: &mut R) -> Result<MastForest, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<MastForest, DeserializationError>where
R: ByteReader,
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn min_serialized_size() -> usize
fn min_serialized_size() -> usize
Source§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§fn read_from_bytes_with_budget(
bytes: &[u8],
budget: usize,
) -> Result<Self, DeserializationError>
fn read_from_bytes_with_budget( bytes: &[u8], budget: usize, ) -> Result<Self, DeserializationError>
Self from bytes with a byte budget limit. Read moreSource§impl<'de> Deserialize<'de> for MastForest
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MastForest
serde only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<MastForest, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MastForest, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Index<DecoratorId> for MastForest
impl Index<DecoratorId> for MastForest
Source§fn index(
&self,
decorator_id: DecoratorId,
) -> &<MastForest as Index<DecoratorId>>::Output
fn index( &self, decorator_id: DecoratorId, ) -> &<MastForest as Index<DecoratorId>>::Output
container[index]) operation. Read moreSource§impl Index<MastNodeId> for MastForest
impl Index<MastNodeId> for MastForest
Source§fn index(
&self,
node_id: MastNodeId,
) -> &<MastForest as Index<MastNodeId>>::Output
fn index( &self, node_id: MastNodeId, ) -> &<MastForest as Index<MastNodeId>>::Output
container[index]) operation. Read moreSource§impl IndexMut<DecoratorId> for MastForest
impl IndexMut<DecoratorId> for MastForest
Source§fn index_mut(
&mut self,
decorator_id: DecoratorId,
) -> &mut <MastForest as Index<DecoratorId>>::Output
fn index_mut( &mut self, decorator_id: DecoratorId, ) -> &mut <MastForest as Index<DecoratorId>>::Output
container[index]) operation. Read moreSource§impl IndexMut<MastNodeId> for MastForest
impl IndexMut<MastNodeId> for MastForest
Source§fn index_mut(
&mut self,
node_id: MastNodeId,
) -> &mut <MastForest as Index<MastNodeId>>::Output
fn index_mut( &mut self, node_id: MastNodeId, ) -> &mut <MastForest as Index<MastNodeId>>::Output
container[index]) operation. Read moreSource§impl PartialEq for MastForest
Equality implementations
impl PartialEq for MastForest
Equality implementations
Source§impl Serializable for MastForest
impl Serializable for MastForest
Source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
self into bytes and writes these bytes into the target.Source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Source§impl Serialize for MastForest
Available on crate feature serde only.
impl Serialize for MastForest
serde only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl Eq for MastForest
Auto Trait Implementations§
impl !Freeze for MastForest
impl RefUnwindSafe for MastForest
impl Send for MastForest
impl Sync for MastForest
impl Unpin for MastForest
impl UnwindSafe for MastForest
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 moreSource§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 more