#[repr(u8)]pub enum Op {
Show 113 variants
Constant = 0,
Nil = 1,
True = 2,
False = 3,
RootHarness = 4,
GetVar = 5,
DefLet = 6,
DefVar = 7,
DefCell = 8,
SetVar = 9,
PushScope = 10,
PopScope = 11,
Add = 12,
Sub = 13,
Mul = 14,
Div = 15,
Mod = 16,
Pow = 17,
Negate = 18,
Equal = 19,
NotEqual = 20,
Less = 21,
Greater = 22,
LessEqual = 23,
GreaterEqual = 24,
Not = 25,
Jump = 26,
JumpIfFalse = 27,
JumpIfTrue = 28,
Pop = 29,
Call = 30,
TailCall = 31,
Return = 32,
Closure = 33,
BuildList = 34,
BuildDict = 35,
Subscript = 36,
SubscriptOpt = 37,
Slice = 38,
GetProperty = 39,
GetPropertyOpt = 40,
SetProperty = 41,
SetSubscript = 42,
SetLocalSlotProperty = 43,
SetLocalSlotSubscript = 44,
MethodCall = 45,
MethodCallOpt = 46,
Concat = 47,
IterInit = 48,
IterNext = 49,
Pipe = 50,
Throw = 51,
TryCatchSetup = 52,
PopHandler = 53,
Parallel = 54,
ParallelMap = 55,
ParallelMapStream = 56,
ParallelSettle = 57,
Spawn = 58,
SyncMutexEnter = 59,
SyncMutexEnterKeyed = 60,
TaskScopeEnter = 61,
TaskScopeExit = 62,
Import = 63,
SelectiveImport = 64,
NamespaceImport = 65,
DeadlineSetup = 66,
DeadlineEnd = 67,
BuildEnum = 68,
MatchEnum = 69,
PopIterator = 70,
GetArgc = 71,
CheckType = 72,
TryUnwrap = 73,
TryWrapOk = 74,
CallSpread = 75,
CallBuiltin = 76,
CallBuiltinSpread = 77,
MethodCallSpread = 78,
Dup = 79,
Swap = 80,
Contains = 81,
AddInt = 82,
SubInt = 83,
MulInt = 84,
DivInt = 85,
ModInt = 86,
AddFloat = 87,
SubFloat = 88,
MulFloat = 89,
DivFloat = 90,
ModFloat = 91,
EqualInt = 92,
NotEqualInt = 93,
LessInt = 94,
GreaterInt = 95,
LessEqualInt = 96,
GreaterEqualInt = 97,
EqualFloat = 98,
NotEqualFloat = 99,
LessFloat = 100,
GreaterFloat = 101,
LessEqualFloat = 102,
GreaterEqualFloat = 103,
EqualBool = 104,
NotEqualBool = 105,
EqualString = 106,
NotEqualString = 107,
Yield = 108,
GetLocalSlot = 109,
DefLocalSlot = 110,
SetLocalSlot = 111,
ConcatAssignLocal = 112,
}Variants§
Constant = 0
Nil = 1
True = 2
False = 3
RootHarness = 4
GetVar = 5
DefLet = 6
DefVar = 7
DefCell = 8
SetVar = 9
PushScope = 10
PopScope = 11
Add = 12
Sub = 13
Mul = 14
Div = 15
Mod = 16
Pow = 17
Negate = 18
Equal = 19
NotEqual = 20
Less = 21
Greater = 22
LessEqual = 23
GreaterEqual = 24
Not = 25
Jump = 26
JumpIfFalse = 27
JumpIfTrue = 28
Pop = 29
Call = 30
TailCall = 31
Return = 32
Closure = 33
BuildList = 34
BuildDict = 35
Subscript = 36
SubscriptOpt = 37
Slice = 38
GetProperty = 39
GetPropertyOpt = 40
SetProperty = 41
SetSubscript = 42
SetLocalSlotProperty = 43
SetLocalSlotSubscript = 44
MethodCall = 45
MethodCallOpt = 46
Concat = 47
IterInit = 48
IterNext = 49
Pipe = 50
Throw = 51
TryCatchSetup = 52
PopHandler = 53
Parallel = 54
ParallelMap = 55
ParallelMapStream = 56
ParallelSettle = 57
Spawn = 58
SyncMutexEnter = 59
SyncMutexEnterKeyed = 60
TaskScopeEnter = 61
TaskScopeExit = 62
Import = 63
SelectiveImport = 64
NamespaceImport = 65
DeadlineSetup = 66
DeadlineEnd = 67
BuildEnum = 68
MatchEnum = 69
PopIterator = 70
GetArgc = 71
CheckType = 72
TryUnwrap = 73
TryWrapOk = 74
CallSpread = 75
CallBuiltin = 76
CallBuiltinSpread = 77
MethodCallSpread = 78
Dup = 79
Swap = 80
Contains = 81
AddInt = 82
SubInt = 83
MulInt = 84
DivInt = 85
ModInt = 86
AddFloat = 87
SubFloat = 88
MulFloat = 89
DivFloat = 90
ModFloat = 91
EqualInt = 92
NotEqualInt = 93
LessInt = 94
GreaterInt = 95
LessEqualInt = 96
GreaterEqualInt = 97
EqualFloat = 98
NotEqualFloat = 99
LessFloat = 100
GreaterFloat = 101
LessEqualFloat = 102
GreaterEqualFloat = 103
EqualBool = 104
NotEqualBool = 105
EqualString = 106
NotEqualString = 107
Yield = 108
GetLocalSlot = 109
DefLocalSlot = 110
SetLocalSlot = 111
ConcatAssignLocal = 112
Implementations§
Source§impl Op
impl Op
Sourcepub const fn portability(self) -> Portability
pub const fn portability(self) -> Portability
Whether Portable Kernel v1 has an explicit execution arm for this opcode. Artifact validation uses this closed classification so an opcode addition cannot become browser-executable by omission.
pub const fn is_portable_v1(self) -> bool
Trait Implementations§
impl Copy for Op
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Op
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
renamed to 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);