pub enum ExecutionError {
Show 41 variants
AdviceMapKeyNotFound {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
key: [BaseElement; 4],
},
AdviceMapKeyAlreadyPresent {
key: [BaseElement; 4],
prev_values: Vec<BaseElement>,
new_values: Vec<BaseElement>,
},
AdviceStackReadFailed {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
row: RowIndex,
},
CallInSyscall(&'static str),
CallerNotInSyscall,
CircularExternalNode(RpoDigest),
CycleLimitExceeded(u32),
DecoratorNotFoundInForest {
decorator_id: DecoratorId,
},
DivideByZero {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
clk: RowIndex,
},
DynamicNodeNotFound {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
digest: RpoDigest,
},
EventError {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
error: Box<dyn Error + Sync + Send>,
},
Ext2InttError(Ext2InttError),
FailedAssertion {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
clk: RowIndex,
err_code: BaseElement,
err_msg: Option<Arc<str>>,
},
FailedToExecuteProgram(&'static str),
InvalidFmpValue(BaseElement, BaseElement),
InvalidFriDomainSegment(u64),
InvalidFriLayerFolding(QuadExtension<BaseElement>, QuadExtension<BaseElement>),
InvalidStackDepthOnReturn {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
depth: usize,
},
InvalidMerkleTreeDepth {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
depth: BaseElement,
},
InvalidMerkleTreeNodeIndex {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
depth: BaseElement,
index: BaseElement,
},
LogArgumentZero {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
clk: RowIndex,
},
MalformedSignatureKey {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
key_type: &'static str,
},
MalformedMastForestInHost {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
root_digest: RpoDigest,
},
MastNodeNotFoundInForest {
node_id: MastNodeId,
},
MemoryError(MemoryError),
NoMastForestWithProcedure {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
root_digest: RpoDigest,
},
MerklePathVerificationFailed {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
value: [BaseElement; 4],
index: BaseElement,
root: RpoDigest,
err_code: BaseElement,
err_msg: Option<Arc<str>>,
},
MerkleStoreLookupFailed {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
err: MerkleError,
},
MerkleStoreMergeFailed {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
err: MerkleError,
},
MerkleStoreUpdateFailed {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
err: MerkleError,
},
NotBinaryValueIf {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
value: BaseElement,
},
NotBinaryValueOp {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
value: BaseElement,
},
NotBinaryValueLoop {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
value: BaseElement,
},
NotU32Value {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
value: BaseElement,
err_code: BaseElement,
},
OutputStackOverflow(usize),
ProgramAlreadyExecuted,
ProverError(ProverError),
SmtNodeNotFound {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
node: [BaseElement; 4],
},
SmtNodePreImageNotValid {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
node: [BaseElement; 4],
preimage_len: usize,
},
SyscallTargetNotInKernel {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
proc_root: RpoDigest,
},
AceChipError {
label: SourceSpan,
source_file: Option<Arc<SourceFile>>,
error: AceError,
},
}
Variants§
AdviceMapKeyNotFound
AdviceMapKeyAlreadyPresent
AdviceStackReadFailed
CallInSyscall(&'static str)
This error is caught by the assembler, so we don’t need diagnostics here.
CallerNotInSyscall
This error is caught by the assembler, so we don’t need diagnostics here.
CircularExternalNode(RpoDigest)
CycleLimitExceeded(u32)
DecoratorNotFoundInForest
Fields
decorator_id: DecoratorId
DivideByZero
DynamicNodeNotFound
EventError
Ext2InttError(Ext2InttError)
FailedAssertion
FailedToExecuteProgram(&'static str)
InvalidFmpValue(BaseElement, BaseElement)
InvalidFriDomainSegment(u64)
InvalidFriLayerFolding(QuadExtension<BaseElement>, QuadExtension<BaseElement>)
InvalidStackDepthOnReturn
InvalidMerkleTreeDepth
InvalidMerkleTreeNodeIndex
LogArgumentZero
MalformedSignatureKey
MalformedMastForestInHost
MastNodeNotFoundInForest
Fields
node_id: MastNodeId
MemoryError(MemoryError)
NoMastForestWithProcedure
MerklePathVerificationFailed
Fields
label: SourceSpan
source_file: Option<Arc<SourceFile>>
value: [BaseElement; 4]
index: BaseElement
err_code: BaseElement
MerkleStoreLookupFailed
MerkleStoreMergeFailed
MerkleStoreUpdateFailed
NotBinaryValueIf
NotBinaryValueOp
NotBinaryValueLoop
NotU32Value
Fields
label: SourceSpan
source_file: Option<Arc<SourceFile>>
value: BaseElement
err_code: BaseElement
OutputStackOverflow(usize)
ProgramAlreadyExecuted
ProverError(ProverError)
SmtNodeNotFound
SmtNodePreImageNotValid
SyscallTargetNotInKernel
AceChipError
Implementations§
Source§impl ExecutionError
impl ExecutionError
pub fn advice_map_key_not_found( key: [BaseElement; 4], err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn advice_stack_read_failed( row: RowIndex, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn divide_by_zero( clk: RowIndex, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn dynamic_node_not_found( digest: RpoDigest, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn event_error( error: Box<dyn Error + Sync + Send>, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn failed_assertion( clk: RowIndex, err_code: BaseElement, err_msg: Option<Arc<str>>, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn invalid_merkle_tree_depth( depth: BaseElement, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn invalid_merkle_tree_node_index( depth: BaseElement, index: BaseElement, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn invalid_stack_depth_on_return( depth: usize, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn log_argument_zero( clk: RowIndex, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn malfored_mast_forest_in_host( root_digest: RpoDigest, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn malformed_signature_key( key_type: &'static str, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn merkle_path_verification_failed( value: [BaseElement; 4], index: BaseElement, root: RpoDigest, err_code: BaseElement, err_msg: Option<Arc<str>>, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn merkle_store_lookup_failed( err: MerkleError, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
Sourcepub fn merkle_store_merge_failed(
err: MerkleError,
err_ctx: &ErrorContext<'_, impl MastNodeExt>,
) -> ExecutionError
pub fn merkle_store_merge_failed( err: MerkleError, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
Note: This error currently never occurs, since MerkleStore::merge_roots()
never fails.
pub fn merkle_store_update_failed( err: MerkleError, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn no_mast_forest_with_procedure( root_digest: RpoDigest, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn not_binary_value_if( value: BaseElement, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn not_binary_value_op( value: BaseElement, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn not_binary_value_loop( value: BaseElement, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn not_u32_value( value: BaseElement, err_code: BaseElement, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn smt_node_not_found( node: [BaseElement; 4], err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn smt_node_preimage_not_valid( node: [BaseElement; 4], preimage_len: usize, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn syscall_target_not_in_kernel( proc_root: RpoDigest, err_ctx: &ErrorContext<'_, impl MastNodeExt>, ) -> ExecutionError
pub fn failed_arithmetic_evaluation( err_ctx: &ErrorContext<'_, impl MastNodeExt>, error: AceError, ) -> ExecutionError
Trait Implementations§
Source§impl AsRef<dyn Diagnostic> for ExecutionError
impl AsRef<dyn Diagnostic> for ExecutionError
Source§fn as_ref(&self) -> &(dyn Diagnostic + 'static)
fn as_ref(&self) -> &(dyn Diagnostic + 'static)
Source§impl Debug for ExecutionError
impl Debug for ExecutionError
Source§impl Diagnostic for ExecutionError
impl Diagnostic for ExecutionError
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or enums will work just fine.Source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandler
s to change the display format
of this diagnostic. Read moreSource§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic
’s Diagnostic::source_code
Source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic
’s Diagnostic::labels
to.Diagnostic
s.Source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic
.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Display for ExecutionError
impl Display for ExecutionError
Source§impl Error for ExecutionError
impl Error for ExecutionError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Ext2InttError> for ExecutionError
impl From<Ext2InttError> for ExecutionError
Source§fn from(value: Ext2InttError) -> ExecutionError
fn from(value: Ext2InttError) -> ExecutionError
Auto Trait Implementations§
impl Freeze for ExecutionError
impl !RefUnwindSafe for ExecutionError
impl Send for ExecutionError
impl Sync for ExecutionError
impl Unpin for ExecutionError
impl !UnwindSafe for ExecutionError
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> 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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);