Skip to main content

SystemEvent

Enum SystemEvent 

Source
#[repr(u8)]
pub enum SystemEvent {
Show 25 variants MerkleNodeMerge = 0, MerkleNodeToStack = 1, MapValueToStack = 2, MapValueCountToStack = 3, MapValueToStackN0 = 4, MapValueToStackN4 = 5, MapValueToStackN8 = 6, HasMapKey = 7, Ext2Inv = 8, U32Clz = 9, U32Ctz = 10, U32Clo = 11, U32Cto = 12, ILog2 = 13, MemToMap = 14, HdwordToMap = 15, HdwordToMapWithDomain = 16, HqwordToMap = 17, HpermToMap = 18, DeferredRegister = 19, DeferredEvaluate = 20, DeferredEvaluateTag = 21, DeferredEvaluatePayload = 22, DeferredRegisterData = 23, TraceEvent = 24,
}
Expand description

Defines a set of host-side actions which can be initiated from the VM.

Most actions update or query one of the three advice-provider components: Merkle store, advice stack, or advice map. Deferred-DAG actions update host-side deferred state, and evaluation may also push canonical node data to the advice stack.

All actions, except for MerkleNodeMerge, Ext2Inv and UpdateMerkleNode can be invoked directly from Miden assembly via dedicated instructions.

System event IDs are derived from blake3-hashing their names (prefixed with “sys::”).

The enum variant order matches the indices in SYSTEM_EVENT_LOOKUP, allowing efficient const lookup via to_event_id(). The discriminants are implicitly 0, 1, 2, … COUNT - 1.

Variants§

§

MerkleNodeMerge = 0

Creates a new Merkle tree in the advice provider by combining Merkle trees with the specified roots. The root of the new tree is defined as Hash(LEFT_ROOT, RIGHT_ROOT).

Inputs: Operand stack: [LEFT_ROOT, RIGHT_ROOT, …] Merkle store: {LEFT_ROOT, RIGHT_ROOT}

Outputs: Operand stack: [LEFT_ROOT, RIGHT_ROOT, …] Merkle store: {LEFT_ROOT, RIGHT_ROOT, hash(LEFT_ROOT, RIGHT_ROOT)}

After the operation, both the original trees and the new tree remains in the advice provider (i.e., the input trees are not removed).

§

MerkleNodeToStack = 1

Pushes a node of the Merkle tree specified by the values on the top of the operand stack onto the advice stack in structural order for consumption by AdvPopW.

Inputs: Operand stack: [depth, index, TREE_ROOT, …] Advice stack: […] Merkle store: {TREE_ROOT<-NODE}

Outputs: Operand stack: [depth, index, TREE_ROOT, …] Advice stack: [NODE, …] Merkle store: {TREE_ROOT<-NODE}

§

MapValueToStack = 2

Pushes a list of field elements onto the advice stack. The list is looked up in the advice map using the specified word from the operand stack as the key.

Inputs: Operand stack: [KEY, …] Advice stack: […] Advice map: {KEY: values}

Outputs: Operand stack: [KEY, …] Advice stack: [values, …] Advice map: {KEY: values}

§

MapValueCountToStack = 3

Pushes the number of elements in a list of field elements onto the advice stack. The list is looked up in the advice map using the specified word from the operand stack as the key.

Inputs: Operand stack: [KEY, …] Advice stack: […] Advice map: {KEY: values}

Outputs: Operand stack: [KEY, …] Advice stack: [values.len(), …] Advice map: {KEY: values}

§

MapValueToStackN0 = 4

Pushes a list of field elements onto the advice stack, along with the number of elements in that list. The list is looked up in the advice map using the word at the top of the operand stack as the key.

Notice that the resulting elements list is not padded.

Inputs: Operand stack: [KEY, …] Advice stack: […] Advice map: {KEY: values}

Outputs: Operand stack: [KEY, …] Advice stack: [num_values, values, …] Advice map: {KEY: values}

§

MapValueToStackN4 = 5

Pushes a padded list of field elements onto the advice stack, along with the number of elements in that list. The list is looked up in the advice map using the word at the top of the operand stack as the key.

Notice that the elements list obtained from the advice map will be padded with zeros, increasing its length to the next multiple of 4.

Inputs: Operand stack: [KEY, …] Advice stack: […] Advice map: {KEY: values}

Outputs: Operand stack: [KEY, …] Advice stack: [num_values, values, padding, …] Advice map: {KEY: values}

§

MapValueToStackN8 = 6

Pushes a padded list of field elements onto the advice stack, along with the number of elements in that list. The list is looked up in the advice map using the word at the top of the operand stack as the key.

Notice that the elements list obtained from the advice map will be padded with zeros, increasing its length to the next multiple of 8.

Inputs: Operand stack: [KEY, …] Advice stack: […] Advice map: {KEY: values}

Outputs: Operand stack: [KEY, …] Advice stack: [num_values, values, padding, …] Advice map: {KEY: values}

§

HasMapKey = 7

Pushes a flag onto the advice stack whether advice map has an entry with specified key.

If the advice map has the entry with the key equal to the key placed at the top of the operand stack, 1 will be pushed to the advice stack and 0 otherwise.

Inputs: Operand stack: [KEY, …] Advice stack: […]

Outputs: Operand stack: [KEY, …] Advice stack: [has_mapkey, …]

§

Ext2Inv = 8

Given an element in a quadratic extension field on the top of the stack (i.e., a0, b1), computes its multiplicative inverse and push the result onto the advice stack.

Inputs: Operand stack: [a1, a0, …] Advice stack: […]

Outputs: Operand stack: [a1, a0, …] Advice stack: [b0, b1…]

Where (b0, b1) is the multiplicative inverse of the extension field element (a0, a1) at the top of the stack.

§

U32Clz = 9

Pushes the number of the leading zeros of the top stack element onto the advice stack.

Inputs: Operand stack: [n, …] Advice stack: […]

Outputs: Operand stack: [n, …] Advice stack: [leading_zeros, …]

§

U32Ctz = 10

Pushes the number of the trailing zeros of the top stack element onto the advice stack.

Inputs: Operand stack: [n, …] Advice stack: […]

Outputs: Operand stack: [n, …] Advice stack: [trailing_zeros, …]

§

U32Clo = 11

Pushes the number of the leading ones of the top stack element onto the advice stack.

Inputs: Operand stack: [n, …] Advice stack: […]

Outputs: Operand stack: [n, …] Advice stack: [leading_ones, …]

§

U32Cto = 12

Pushes the number of the trailing ones of the top stack element onto the advice stack.

Inputs: Operand stack: [n, …] Advice stack: […]

Outputs: Operand stack: [n, …] Advice stack: [trailing_ones, …]

§

ILog2 = 13

Pushes the base 2 logarithm of the top stack element, rounded down. Inputs: Operand stack: [n, …] Advice stack: […]

Outputs: Operand stack: [n, …] Advice stack: [ilog2(n), …]

§

MemToMap = 14

Reads words from memory at the specified range and inserts them into the advice map under the key KEY located at the top of the stack.

Inputs: Operand stack: [KEY, start_addr, end_addr, …] Advice map: {…}

Outputs: Operand stack: [KEY, start_addr, end_addr, …] Advice map: {KEY: values}

Where values are the elements located in memory[start_addr..end_addr].

§

HdwordToMap = 15

Reads two word from the operand stack and inserts them into the advice map under the key defined by the hash of these words.

Inputs: Operand stack: [A, B, …] Advice map: {…}

Outputs: Operand stack: [A, B, …] Advice map: {KEY: [a0, a1, a2, a3, b0, b1, b2, b3]}

Where KEY is computed as hash(A || B, domain=0).

§

HdwordToMapWithDomain = 16

Reads two words from the operand stack and inserts them into the advice map under the key defined by the hash of these words (using d as the domain).

Inputs: Operand stack: [A, B, d, …] Advice map: {…}

Outputs: Operand stack: [A, B, d, …] Advice map: {KEY: [a0, a1, a2, a3, b0, b1, b2, b3]}

Where KEY is computed as hash(A || B, d).

§

HqwordToMap = 17

Reads four words from the operand stack and inserts them into the advice map under the key defined by the hash of these words.

Inputs: Operand stack: [A, B, C, D, …] Advice map: {…}

Outputs: Operand stack: [A, B, C, D, …] Advice map: {KEY: [A, B, C, D]} (16 elements)

Where:

  • KEY is computed as hash_elements([A, B, C, D]) using the sponge construction (sequential absorption; two rounds for four words).
§

HpermToMap = 18

Reads three words from the operand stack and inserts the top two words into the advice map under the key defined by applying a Poseidon2 permutation to all three words.

Inputs: Operand stack: [A, B, C, …] Advice map: {…}

Outputs: Operand stack: [A, B, C, …] Advice map: {KEY: [a0, a1, a2, a3, b0, b1, b2, b3]}

Where KEY is computed by extracting the digest elements from hperm([C, A, B]). For example, if C is [0, d, 0, 0], KEY will be set as hash(A || B, d).

§

DeferredRegister = 19

Registers and eagerly evaluates a deferred node whose full payload is on the operand stack.

TAG is one word (4 field elements). PAYLOAD_LO || PAYLOAD_HI is eight field elements: either one crate::deferred::DataChunk, two child digests (lhs || rhs) for a join, or one lhs || rhs pair for a pair-list node. Exact crate::deferred::Tag::CHUNKS ([2, 0, 0, 0]) is framework-owned opaque data; malformed id-2 tags are rejected during tag decode. The installed registry decodes TAG via crate::deferred::DeferredState::decode; TRUE is not accepted by this event. Tags that semantically require more data chunks or pairs are rejected during precompile-specific evaluation. Registration is performed by crate::deferred::DeferredState::register, so semantic failures surface immediately.

This event does not push advice or return the node digest. The stack arguments are visible in the VM execution trace, but the host-side registration is not constrained by the event. Assembly code that later relies on the digest must compute it inside the VM from the same TAG and payload.

Inputs: Operand stack: [event_id, PAYLOAD_LO, PAYLOAD_HI, TAG, …]

Outputs: Operand stack: unchanged Advice stack: unchanged Deferred state: node registered and semantically evaluated

§

DeferredEvaluate = 20

Evaluates a registered deferred node and pushes its canonical tag and payload as advice.

NODE_DIGEST is one word (4 field elements) and must already be registered in deferred state. The handler evaluates it with crate::deferred::DeferredState::evaluate_digest, fetches the canonical node, and pushes its tag followed by its payload to the advice stack.

The tag is emitted first in advice-pop order so adv_pushw adv_pushw adv_pushw leaves [PAYLOAD_LO, PAYLOAD_HI, TAG, ...] on the operand stack for a single 8-felt payload. Data payloads push two words per 8-felt chunk in advice order HIGH, LOW, preserving canonical chunk order. Join payloads use the same two-word LIFO convention, leaving [lhs, rhs, TAG, ...]. TRUE pushes only Tag::TRUE. These felts are unbound host hints. Before proof-relevant use, assembly code must relate them with VM instructions to values established independently of that advice.

Inputs: Operand stack: [event_id, NODE_DIGEST, …]

Outputs: Operand stack: unchanged Advice stack: canonical tag, then canonical payload words for adv_pushw LIFO consumption

§

DeferredEvaluateTag = 21

Evaluates a registered deferred node and pushes only its canonical tag as advice.

NODE_DIGEST is one word (4 field elements) and must already be registered in deferred state. TRUE pushes Tag::TRUE. The returned tag is an unbound host hint; before proof-relevant use, assembly code must relate it with VM instructions to a value established independently of that advice.

Inputs: Operand stack: [event_id, NODE_DIGEST, …]

Outputs: Operand stack: unchanged Advice stack: canonical tag only

§

DeferredEvaluatePayload = 22

Evaluates a registered deferred node and pushes only its canonical payload as advice.

This is the payload-only compatibility event. Data payloads push two words per 8-felt chunk in advice order HIGH, LOW so adv_pushw adv_pushw leaves [LOW, HIGH, ...] on the operand stack for that chunk. Chunks are emitted in canonical chunk order. Join payloads use the same two-word LIFO convention, leaving [lhs, rhs, ...] after two adv_pushws. TRUE pushes no advice. These felts are unbound host hints. Before proof-relevant use, assembly code must relate them with VM instructions to values established independently of that advice.

Inputs: Operand stack: [event_id, NODE_DIGEST, …]

Outputs: Operand stack: unchanged Advice stack: canonical payload only, word-ordered for adv_pushw LIFO consumption

§

DeferredRegisterData = 23

Registers and eagerly evaluates a memory-backed deferred node.

TAG is one word (4 field elements), and the installed registry decodes it to determine the memory-backed payload shape. The stack-supplied ptr and n_chunks are visible in the VM execution trace and select the range [ptr, ptr + 8 * n_chunks). The host reads n_chunks 8-felt crate::deferred::DataChunk values from that range, but this event adds no AIR constraint tying the registered contents to those memory cells.

Exact crate::deferred::Tag::CHUNKS ([2, 0, 0, 0]) registers the chunks as framework-owned opaque data, while other data tags remain precompile-owned. Malformed id-2 tags are rejected during tag decode. Pair-list tags interpret chunks as lhs || rhs pairs. Join tags require n_chunks == 1 and interpret the single chunk as lhs || rhs. TRUE is not accepted. The handler performs a cheap budget pre-check before allocating or reading memory, then delegates registration to crate::deferred::DeferredState::register.

This event does not push advice or return the node digest. A program that relies on the registered node must compute its digest with VM instructions from the same TAG and ordered chunk sequence. The register_mem MASM wrapper does this by applying a Poseidon2 linear hash to the same range, with one absorption per chunk and TAG as the initial capacity word. If the event and the VM hash different chunk sequences, the VM-computed digest does not identify the host-registered node and cannot bind that registration into a proof-relevant deferred claim.

Inputs: Operand stack: [event_id, TAG, ptr, n_chunks, …]

Outputs: Operand stack: unchanged Advice stack: unchanged Deferred state: node registered and semantically evaluated

§

TraceEvent = 24

Signals an optional, read-only trace event to the host.

When emit observes this system event ID at stack position 0, the VM forwards the user trace event ID at stack position 1 to the host’s trace handler. This is typically emitted as push.<user_trace_id> push.<sys::trace_event> emit. Trace handlers can observe the processor state, but cannot mutate VM state or the advice provider. If no handler is registered for the user trace event ID, the event is a no-op.

Hosts are expected to not raise an error if they encounter a user_trace_id for which no trace handler is registered.

Inputs: Operand stack: [sys::trace_event, user_trace_id, …]

Outputs: Operand stack: unchanged Advice provider: unchanged

Implementations§

Source§

impl SystemEvent

Source

pub const fn from_event_id(event_id: EventId) -> Option<Self>

Attempts to convert an EventId into a SystemEvent by looking it up in the const table.

Returns Some(SystemEvent) if the ID matches a known system event, None otherwise. This uses a const lookup table with hardcoded EventIds, avoiding runtime hash computation.

Source

pub const fn from_name(name: &str) -> Option<Self>

Attempts to convert a name into a SystemEvent by looking it up in the const table.

Returns Some(SystemEvent) if the name matches a known system event, None otherwise. This uses const string comparison against the lookup table.

Source

pub const fn event_name(&self) -> EventName

Returns the human-readable name of this system event as an EventName.

System event names are prefixed with sys:: to distinguish them from user-defined events.

Source

pub const fn event_id(&self) -> EventId

Returns the EventId for this system event.

The ID is looked up from the const LOOKUP table using the enum’s discriminant as the index. The discriminants are explicitly set to match the array indices.

Source

pub const fn all() -> [Self; 25]

Returns an array of all system event variants.

Source§

impl SystemEvent

Source

pub const COUNT: usize = 25

The total number of system events.

Trait Implementations§

Source§

impl Clone for SystemEvent

Source§

fn clone(&self) -> SystemEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SystemEvent

Source§

impl Debug for SystemEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SystemEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SystemEvent

Source§

impl From<SystemEvent> for EventName

Source§

fn from(system_event: SystemEvent) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SystemEvent

Source§

fn eq(&self, other: &SystemEvent) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PrettyPrint for SystemEvent

Source§

fn render(&self) -> Document

The core of the PrettyPrint functionality. Read more
Source§

fn to_pretty_string(&self) -> String

Produce a String containing the results of pretty-printing this object. Read more
Source§

fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Pretty-print this object to the given core::fmt::Formatter. Read more
Source§

impl StructuralPartialEq for SystemEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Dup for T
where T: Copy + Clone,

Source§

fn dup(&self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more