Enum ergotree_ir::mir::expr::Expr
source · pub enum Expr {
Show 66 variants
Append(Spanned<Append>),
Const(Constant),
ConstPlaceholder(ConstantPlaceholder),
SubstConstants(Spanned<SubstConstants>),
ByteArrayToLong(Spanned<ByteArrayToLong>),
ByteArrayToBigInt(Spanned<ByteArrayToBigInt>),
LongToByteArray(LongToByteArray),
Collection(Collection),
Tuple(Tuple),
CalcBlake2b256(CalcBlake2b256),
CalcSha256(CalcSha256),
Context,
Global,
GlobalVars(GlobalVars),
FuncValue(FuncValue),
Apply(Apply),
MethodCall(Spanned<MethodCall>),
PropertyCall(Spanned<PropertyCall>),
BlockValue(Spanned<BlockValue>),
ValDef(Spanned<ValDef>),
ValUse(ValUse),
If(If),
BinOp(Spanned<BinOp>),
And(Spanned<And>),
Or(Spanned<Or>),
Xor(Xor),
Atleast(Atleast),
LogicalNot(Spanned<LogicalNot>),
Negation(Spanned<Negation>),
BitInversion(BitInversion),
OptionGet(Spanned<OptionGet>),
OptionIsDefined(Spanned<OptionIsDefined>),
OptionGetOrElse(Spanned<OptionGetOrElse>),
ExtractAmount(ExtractAmount),
ExtractRegisterAs(Spanned<ExtractRegisterAs>),
ExtractBytes(ExtractBytes),
ExtractBytesWithNoRef(ExtractBytesWithNoRef),
ExtractScriptBytes(ExtractScriptBytes),
ExtractCreationInfo(ExtractCreationInfo),
ExtractId(ExtractId),
ByIndex(Spanned<ByIndex>),
SizeOf(SizeOf),
Slice(Spanned<Slice>),
Fold(Spanned<Fold>),
Map(Spanned<Map>),
Filter(Spanned<Filter>),
Exists(Spanned<Exists>),
ForAll(Spanned<ForAll>),
SelectField(Spanned<SelectField>),
BoolToSigmaProp(BoolToSigmaProp),
Upcast(Upcast),
Downcast(Downcast),
CreateProveDlog(CreateProveDlog),
CreateProveDhTuple(CreateProveDhTuple),
SigmaPropBytes(SigmaPropBytes),
DecodePoint(DecodePoint),
SigmaAnd(SigmaAnd),
SigmaOr(SigmaOr),
GetVar(Spanned<GetVar>),
DeserializeRegister(DeserializeRegister),
DeserializeContext(DeserializeContext),
MultiplyGroup(MultiplyGroup),
Exponentiate(Exponentiate),
XorOf(XorOf),
TreeLookup(Spanned<TreeLookup>),
CreateAvlTree(CreateAvlTree),
}
Expand description
Expression in ErgoTree
Variants§
Append(Spanned<Append>)
Append - Concatenation of two collections
Const(Constant)
Constant value
ConstPlaceholder(ConstantPlaceholder)
Placeholder for a constant
SubstConstants(Spanned<SubstConstants>)
Substitute constants in serialized ergo tree
ByteArrayToLong(Spanned<ByteArrayToLong>)
Convert byte array to SLong
ByteArrayToBigInt(Spanned<ByteArrayToBigInt>)
Convert byte array to SLong
LongToByteArray(LongToByteArray)
Convert SLong to a byte array
Collection(Collection)
Collection declaration (array of expressions of the same type)
Tuple(Tuple)
Tuple declaration
CalcBlake2b256(CalcBlake2b256)
Predefined functions (global) Blake2b256 hash calculation
CalcSha256(CalcSha256)
Sha256 hash calculation
Context
Context variables (external)
Global
Special global value which is used to define methods
GlobalVars(GlobalVars)
Predefined global variables
FuncValue(FuncValue)
Function definition
Apply(Apply)
Function application
MethodCall(Spanned<MethodCall>)
Method call
PropertyCall(Spanned<PropertyCall>)
Property call
BlockValue(Spanned<BlockValue>)
Block (statements, followed by an expression)
ValDef(Spanned<ValDef>)
let-bound expression
ValUse(ValUse)
Reference to ValDef
If(If)
If, non-lazy - evaluate both branches
BinOp(Spanned<BinOp>)
Binary operation
And(Spanned<And>)
Logical AND
Or(Spanned<Or>)
Logical OR
Xor(Xor)
Byte-wise XOR
Atleast(Atleast)
THRESHOLD composition for sigma expressions
LogicalNot(Spanned<LogicalNot>)
LogicalNot
Negation(Spanned<Negation>)
Negation on numeric type
BitInversion(BitInversion)
Bit inversion on numeric type
OptionGet(Spanned<OptionGet>)
Option.get method
OptionIsDefined(Spanned<OptionIsDefined>)
Option.isDefined method
OptionGetOrElse(Spanned<OptionGetOrElse>)
Returns the option’s value if the option is nonempty, otherwise return the result of evaluating default
.
ExtractAmount(ExtractAmount)
Box monetary value
ExtractRegisterAs(Spanned<ExtractRegisterAs>)
Extract register’s value (box.RX properties)
ExtractBytes(ExtractBytes)
Extract serialized box bytes
ExtractBytesWithNoRef(ExtractBytesWithNoRef)
Extract serialized box bytes excluding transaction_id & index
ExtractScriptBytes(ExtractScriptBytes)
Extract box’s guarding script serialized to bytes
ExtractCreationInfo(ExtractCreationInfo)
Tuple of height when block got included into the blockchain and transaction identifier with box index in the transaction outputs serialized to the byte array.
ExtractId(ExtractId)
Box id, Blake2b256 hash of this box’s content, basically equals to blake2b256(bytes)
ByIndex(Spanned<ByIndex>)
Collection, get element by index
SizeOf(SizeOf)
Collection size
Slice(Spanned<Slice>)
Collection slice
Fold(Spanned<Fold>)
Collection fold op
Map(Spanned<Map>)
Collection map op
Filter(Spanned<Filter>)
Collection filter op
Exists(Spanned<Exists>)
Tests whether a predicate holds for at least one element of this collection
ForAll(Spanned<ForAll>)
Tests whether a predicate holds for all elements of this collection.
SelectField(Spanned<SelectField>)
Tuple field access
BoolToSigmaProp(BoolToSigmaProp)
Bool to SigmaProp
Upcast(Upcast)
Upcast numeric value
Downcast(Downcast)
Downcast numeric value
CreateProveDlog(CreateProveDlog)
Create proveDlog from GroupElement(PK)
CreateProveDhTuple(CreateProveDhTuple)
Create proveDlog from GroupElement(PK)
SigmaPropBytes(SigmaPropBytes)
Extract serialized bytes of a SigmaProp value
DecodePoint(DecodePoint)
Decode byte array to EC point
SigmaAnd(SigmaAnd)
AND conjunction for sigma propositions
SigmaOr(SigmaOr)
OR conjunction for sigma propositions
GetVar(Spanned<GetVar>)
Extracts Context variable by id and type
DeserializeRegister(DeserializeRegister)
Extract register of SELF box as Coll[Byte]
, deserialize it into Value and inline into
the executing script.
DeserializeContext(DeserializeContext)
Extracts context variable as Coll[Byte]
, deserializes it to script and then executes
this script in the current context. The original Coll[Byte]
of the script is
available as getVar[Coll[Byte]](id)
On evaluation returns the result of the
script execution in the current context
MultiplyGroup(MultiplyGroup)
MultiplyGroup op for GroupElement
Exponentiate(Exponentiate)
Exponentiate op for GroupElement
XorOf(XorOf)
XOR for collection of booleans
TreeLookup(Spanned<TreeLookup>)
Perform a lookup by key in an AVL tree
CreateAvlTree(CreateAvlTree)
Create an AVL tree
Implementations§
source§impl Expr
impl Expr
sourcepub fn post_eval_tpe(&self) -> SType
pub fn post_eval_tpe(&self) -> SType
Type expected after the evaluation
sourcepub fn check_post_eval_tpe(
&self,
expected_tpe: &SType
) -> Result<(), InvalidExprEvalTypeError>
pub fn check_post_eval_tpe( &self, expected_tpe: &SType ) -> Result<(), InvalidExprEvalTypeError>
Check if given expected_tpe type is the same as the expression’s post-evaluation type
sourcepub fn debug_tree(&self) -> String
pub fn debug_tree(&self) -> String
Prints the tree with newlines
sourcepub fn to_string_pretty(&self) -> String
pub fn to_string_pretty(&self) -> String
Pretty prints the tree
source§impl Expr
impl Expr
sourcepub fn pretty_print(&self) -> Result<(Expr, String), PrintError>
pub fn pretty_print(&self) -> Result<(Expr, String), PrintError>
Returns pretty printed tree
source§impl Expr
impl Expr
sourcepub fn parse_with_tag<R: SigmaByteRead>(
r: &mut R,
tag: u8
) -> Result<Self, SigmaParsingError>
pub fn parse_with_tag<R: SigmaByteRead>( r: &mut R, tag: u8 ) -> Result<Self, SigmaParsingError>
Parse expression from byte stream. This function should be used instead of
sigma_parse
when tag byte is already read for look-ahead
Trait Implementations§
source§impl From<BitInversion> for Expr
impl From<BitInversion> for Expr
source§fn from(original: BitInversion) -> Expr
fn from(original: BitInversion) -> Expr
source§impl From<BlockValue> for Expr
impl From<BlockValue> for Expr
source§fn from(v: BlockValue) -> Self
fn from(v: BlockValue) -> Self
source§impl From<BoolToSigmaProp> for Expr
impl From<BoolToSigmaProp> for Expr
source§fn from(original: BoolToSigmaProp) -> Expr
fn from(original: BoolToSigmaProp) -> Expr
source§impl From<ByteArrayToBigInt> for Expr
impl From<ByteArrayToBigInt> for Expr
source§fn from(v: ByteArrayToBigInt) -> Self
fn from(v: ByteArrayToBigInt) -> Self
source§impl From<ByteArrayToLong> for Expr
impl From<ByteArrayToLong> for Expr
source§fn from(v: ByteArrayToLong) -> Self
fn from(v: ByteArrayToLong) -> Self
source§impl From<CalcBlake2b256> for Expr
impl From<CalcBlake2b256> for Expr
source§fn from(original: CalcBlake2b256) -> Expr
fn from(original: CalcBlake2b256) -> Expr
source§impl From<CalcSha256> for Expr
impl From<CalcSha256> for Expr
source§fn from(original: CalcSha256) -> Expr
fn from(original: CalcSha256) -> Expr
source§impl From<Collection> for Expr
impl From<Collection> for Expr
source§fn from(original: Collection) -> Expr
fn from(original: Collection) -> Expr
source§impl From<ConstantPlaceholder> for Expr
impl From<ConstantPlaceholder> for Expr
source§fn from(original: ConstantPlaceholder) -> Expr
fn from(original: ConstantPlaceholder) -> Expr
source§impl From<CreateAvlTree> for Expr
impl From<CreateAvlTree> for Expr
source§fn from(original: CreateAvlTree) -> Expr
fn from(original: CreateAvlTree) -> Expr
source§impl From<CreateProveDhTuple> for Expr
impl From<CreateProveDhTuple> for Expr
source§fn from(original: CreateProveDhTuple) -> Expr
fn from(original: CreateProveDhTuple) -> Expr
source§impl From<CreateProveDlog> for Expr
impl From<CreateProveDlog> for Expr
source§fn from(original: CreateProveDlog) -> Expr
fn from(original: CreateProveDlog) -> Expr
source§impl From<DecodePoint> for Expr
impl From<DecodePoint> for Expr
source§fn from(original: DecodePoint) -> Expr
fn from(original: DecodePoint) -> Expr
source§impl From<DeserializeContext> for Expr
impl From<DeserializeContext> for Expr
source§fn from(original: DeserializeContext) -> Expr
fn from(original: DeserializeContext) -> Expr
source§impl From<DeserializeRegister> for Expr
impl From<DeserializeRegister> for Expr
source§fn from(original: DeserializeRegister) -> Expr
fn from(original: DeserializeRegister) -> Expr
source§impl From<Exponentiate> for Expr
impl From<Exponentiate> for Expr
source§fn from(original: Exponentiate) -> Expr
fn from(original: Exponentiate) -> Expr
source§impl From<ExtractAmount> for Expr
impl From<ExtractAmount> for Expr
source§fn from(original: ExtractAmount) -> Expr
fn from(original: ExtractAmount) -> Expr
source§impl From<ExtractBytes> for Expr
impl From<ExtractBytes> for Expr
source§fn from(original: ExtractBytes) -> Expr
fn from(original: ExtractBytes) -> Expr
source§impl From<ExtractBytesWithNoRef> for Expr
impl From<ExtractBytesWithNoRef> for Expr
source§fn from(original: ExtractBytesWithNoRef) -> Expr
fn from(original: ExtractBytesWithNoRef) -> Expr
source§impl From<ExtractCreationInfo> for Expr
impl From<ExtractCreationInfo> for Expr
source§fn from(original: ExtractCreationInfo) -> Expr
fn from(original: ExtractCreationInfo) -> Expr
source§impl From<ExtractRegisterAs> for Expr
impl From<ExtractRegisterAs> for Expr
source§fn from(v: ExtractRegisterAs) -> Self
fn from(v: ExtractRegisterAs) -> Self
source§impl From<ExtractScriptBytes> for Expr
impl From<ExtractScriptBytes> for Expr
source§fn from(original: ExtractScriptBytes) -> Expr
fn from(original: ExtractScriptBytes) -> Expr
source§impl From<GlobalVars> for Expr
impl From<GlobalVars> for Expr
source§fn from(original: GlobalVars) -> Expr
fn from(original: GlobalVars) -> Expr
source§impl From<LogicalNot> for Expr
impl From<LogicalNot> for Expr
source§fn from(v: LogicalNot) -> Self
fn from(v: LogicalNot) -> Self
source§impl From<LongToByteArray> for Expr
impl From<LongToByteArray> for Expr
source§fn from(original: LongToByteArray) -> Expr
fn from(original: LongToByteArray) -> Expr
source§impl From<MethodCall> for Expr
impl From<MethodCall> for Expr
source§fn from(v: MethodCall) -> Self
fn from(v: MethodCall) -> Self
source§impl From<MultiplyGroup> for Expr
impl From<MultiplyGroup> for Expr
source§fn from(original: MultiplyGroup) -> Expr
fn from(original: MultiplyGroup) -> Expr
source§impl From<OptionGetOrElse> for Expr
impl From<OptionGetOrElse> for Expr
source§fn from(v: OptionGetOrElse) -> Self
fn from(v: OptionGetOrElse) -> Self
source§impl From<OptionIsDefined> for Expr
impl From<OptionIsDefined> for Expr
source§fn from(v: OptionIsDefined) -> Self
fn from(v: OptionIsDefined) -> Self
source§impl From<PropertyCall> for Expr
impl From<PropertyCall> for Expr
source§fn from(v: PropertyCall) -> Self
fn from(v: PropertyCall) -> Self
source§impl From<SelectField> for Expr
impl From<SelectField> for Expr
source§fn from(v: SelectField) -> Self
fn from(v: SelectField) -> Self
source§impl From<SigmaPropBytes> for Expr
impl From<SigmaPropBytes> for Expr
source§fn from(original: SigmaPropBytes) -> Expr
fn from(original: SigmaPropBytes) -> Expr
source§impl From<SubstConstants> for Expr
impl From<SubstConstants> for Expr
source§fn from(v: SubstConstants) -> Self
fn from(v: SubstConstants) -> Self
source§impl From<TreeLookup> for Expr
impl From<TreeLookup> for Expr
source§fn from(v: TreeLookup) -> Self
fn from(v: TreeLookup) -> Self
source§impl PartialEq for Expr
impl PartialEq for Expr
source§impl SigmaSerializable for Expr
impl SigmaSerializable for Expr
source§fn sigma_serialize<W: SigmaByteWrite>(&self, w: &mut W) -> SigmaSerializeResult
fn sigma_serialize<W: SigmaByteWrite>(&self, w: &mut W) -> SigmaSerializeResult
self
to the given writer
.
This function has a sigma_
prefix to alert the reader that the
serialization in use is consensus-critical serialization source§fn sigma_parse<R: SigmaByteRead>(r: &mut R) -> Result<Self, SigmaParsingError>
fn sigma_parse<R: SigmaByteRead>(r: &mut R) -> Result<Self, SigmaParsingError>
self
from the given reader
.
sigma-
prefix to alert the reader that the serialization in use
is consensus-criticalsource§fn sigma_serialize_bytes(&self) -> Result<Vec<u8>, SigmaSerializationError>
fn sigma_serialize_bytes(&self) -> Result<Vec<u8>, SigmaSerializationError>
source§fn sigma_parse_bytes(bytes: &[u8]) -> Result<Self, SigmaParsingError>
fn sigma_parse_bytes(bytes: &[u8]) -> Result<Self, SigmaParsingError>
self
from the bytessource§impl TryFrom<Expr> for BitInversion
impl TryFrom<Expr> for BitInversion
source§impl TryFrom<Expr> for BoolToSigmaProp
impl TryFrom<Expr> for BoolToSigmaProp
source§impl TryFrom<Expr> for CalcBlake2b256
impl TryFrom<Expr> for CalcBlake2b256
source§impl TryFrom<Expr> for CalcSha256
impl TryFrom<Expr> for CalcSha256
source§impl TryFrom<Expr> for Collection
impl TryFrom<Expr> for Collection
source§impl TryFrom<Expr> for ConstantPlaceholder
impl TryFrom<Expr> for ConstantPlaceholder
source§impl TryFrom<Expr> for CreateAvlTree
impl TryFrom<Expr> for CreateAvlTree
source§impl TryFrom<Expr> for CreateProveDhTuple
impl TryFrom<Expr> for CreateProveDhTuple
source§impl TryFrom<Expr> for CreateProveDlog
impl TryFrom<Expr> for CreateProveDlog
source§impl TryFrom<Expr> for DecodePoint
impl TryFrom<Expr> for DecodePoint
source§impl TryFrom<Expr> for DeserializeContext
impl TryFrom<Expr> for DeserializeContext
source§impl TryFrom<Expr> for DeserializeRegister
impl TryFrom<Expr> for DeserializeRegister
source§impl TryFrom<Expr> for Exponentiate
impl TryFrom<Expr> for Exponentiate
source§impl TryFrom<Expr> for ExtractAmount
impl TryFrom<Expr> for ExtractAmount
source§impl TryFrom<Expr> for ExtractBytes
impl TryFrom<Expr> for ExtractBytes
source§impl TryFrom<Expr> for ExtractBytesWithNoRef
impl TryFrom<Expr> for ExtractBytesWithNoRef
source§impl TryFrom<Expr> for ExtractCreationInfo
impl TryFrom<Expr> for ExtractCreationInfo
source§impl TryFrom<Expr> for ExtractScriptBytes
impl TryFrom<Expr> for ExtractScriptBytes
source§impl TryFrom<Expr> for GlobalVars
impl TryFrom<Expr> for GlobalVars
source§impl TryFrom<Expr> for LongToByteArray
impl TryFrom<Expr> for LongToByteArray
source§impl TryFrom<Expr> for MultiplyGroup
impl TryFrom<Expr> for MultiplyGroup
source§impl TryFrom<Expr> for SigmaPropBytes
impl TryFrom<Expr> for SigmaPropBytes
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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.§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§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 more§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§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>
§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>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§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>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.§impl<T> TryConv for T
impl<T> TryConv for T
source§impl<T> TryExtractFrom<Expr> for T
impl<T> TryExtractFrom<Expr> for T
source§fn try_extract_from(v: Expr) -> Result<T, TryExtractFromError>
fn try_extract_from(v: Expr) -> Result<T, TryExtractFromError>
source§impl<F> TryExtractInto<F> for F
impl<F> TryExtractInto<F> for F
source§fn try_extract_into<T>(self) -> Result<T, TryExtractFromError>where
T: TryExtractFrom<F>,
fn try_extract_into<T>(self) -> Result<T, TryExtractFromError>where
T: TryExtractFrom<F>,
super::value::Value
)
on which TryExtractFrom
is implemented