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

source

pub fn tpe(&self) -> SType

Type of the expression

source

pub fn post_eval_tpe(&self) -> SType

Type expected after the evaluation

source

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

source

pub fn debug_tree(&self) -> String

Prints the tree with newlines

source

pub fn to_string_pretty(&self) -> String

Pretty prints the tree

source§

impl Expr

source

pub fn pretty_print(&self) -> Result<(Expr, String), PrintError>

Returns pretty printed tree

source§

impl Expr

source

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

source§

impl Expr

source

pub fn span(&self) -> SourceSpan

Source span for the Expr

Trait Implementations§

source§

impl Clone for Expr

source§

fn clone(&self) -> Expr

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Expr

source§

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

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

impl From<And> for Expr

source§

fn from(v: And) -> Self

Converts to this type from the input type.
source§

impl From<Append> for Expr

source§

fn from(v: Append) -> Self

Converts to this type from the input type.
source§

impl From<Apply> for Expr

source§

fn from(original: Apply) -> Expr

Converts to this type from the input type.
source§

impl From<Atleast> for Expr

source§

fn from(original: Atleast) -> Expr

Converts to this type from the input type.
source§

impl From<BinOp> for Expr

source§

fn from(v: BinOp) -> Self

Converts to this type from the input type.
source§

impl From<BitInversion> for Expr

source§

fn from(original: BitInversion) -> Expr

Converts to this type from the input type.
source§

impl From<BlockValue> for Expr

source§

fn from(v: BlockValue) -> Self

Converts to this type from the input type.
source§

impl From<BoolToSigmaProp> for Expr

source§

fn from(original: BoolToSigmaProp) -> Expr

Converts to this type from the input type.
source§

impl From<ByIndex> for Expr

source§

fn from(v: ByIndex) -> Self

Converts to this type from the input type.
source§

impl From<ByteArrayToBigInt> for Expr

source§

fn from(v: ByteArrayToBigInt) -> Self

Converts to this type from the input type.
source§

impl From<ByteArrayToLong> for Expr

source§

fn from(v: ByteArrayToLong) -> Self

Converts to this type from the input type.
source§

impl From<CalcBlake2b256> for Expr

source§

fn from(original: CalcBlake2b256) -> Expr

Converts to this type from the input type.
source§

impl From<CalcSha256> for Expr

source§

fn from(original: CalcSha256) -> Expr

Converts to this type from the input type.
source§

impl From<Collection> for Expr

source§

fn from(original: Collection) -> Expr

Converts to this type from the input type.
source§

impl From<Constant> for Expr

source§

fn from(original: Constant) -> Expr

Converts to this type from the input type.
source§

impl From<ConstantPlaceholder> for Expr

source§

fn from(original: ConstantPlaceholder) -> Expr

Converts to this type from the input type.
source§

impl From<CreateAvlTree> for Expr

source§

fn from(original: CreateAvlTree) -> Expr

Converts to this type from the input type.
source§

impl From<CreateProveDhTuple> for Expr

source§

fn from(original: CreateProveDhTuple) -> Expr

Converts to this type from the input type.
source§

impl From<CreateProveDlog> for Expr

source§

fn from(original: CreateProveDlog) -> Expr

Converts to this type from the input type.
source§

impl From<DecodePoint> for Expr

source§

fn from(original: DecodePoint) -> Expr

Converts to this type from the input type.
source§

impl From<DeserializeContext> for Expr

source§

fn from(original: DeserializeContext) -> Expr

Converts to this type from the input type.
source§

impl From<DeserializeRegister> for Expr

source§

fn from(original: DeserializeRegister) -> Expr

Converts to this type from the input type.
source§

impl From<Downcast> for Expr

source§

fn from(original: Downcast) -> Expr

Converts to this type from the input type.
source§

impl From<Exists> for Expr

source§

fn from(v: Exists) -> Self

Converts to this type from the input type.
source§

impl From<Exponentiate> for Expr

source§

fn from(original: Exponentiate) -> Expr

Converts to this type from the input type.
source§

impl From<ExtractAmount> for Expr

source§

fn from(original: ExtractAmount) -> Expr

Converts to this type from the input type.
source§

impl From<ExtractBytes> for Expr

source§

fn from(original: ExtractBytes) -> Expr

Converts to this type from the input type.
source§

impl From<ExtractBytesWithNoRef> for Expr

source§

fn from(original: ExtractBytesWithNoRef) -> Expr

Converts to this type from the input type.
source§

impl From<ExtractCreationInfo> for Expr

source§

fn from(original: ExtractCreationInfo) -> Expr

Converts to this type from the input type.
source§

impl From<ExtractId> for Expr

source§

fn from(original: ExtractId) -> Expr

Converts to this type from the input type.
source§

impl From<ExtractRegisterAs> for Expr

source§

fn from(v: ExtractRegisterAs) -> Self

Converts to this type from the input type.
source§

impl From<ExtractScriptBytes> for Expr

source§

fn from(original: ExtractScriptBytes) -> Expr

Converts to this type from the input type.
source§

impl From<Filter> for Expr

source§

fn from(v: Filter) -> Self

Converts to this type from the input type.
source§

impl From<Fold> for Expr

source§

fn from(v: Fold) -> Self

Converts to this type from the input type.
source§

impl From<ForAll> for Expr

source§

fn from(v: ForAll) -> Self

Converts to this type from the input type.
source§

impl From<FuncValue> for Expr

source§

fn from(original: FuncValue) -> Expr

Converts to this type from the input type.
source§

impl From<GetVar> for Expr

source§

fn from(v: GetVar) -> Self

Converts to this type from the input type.
source§

impl From<GlobalVars> for Expr

source§

fn from(original: GlobalVars) -> Expr

Converts to this type from the input type.
source§

impl From<If> for Expr

source§

fn from(original: If) -> Expr

Converts to this type from the input type.
source§

impl From<LogicalNot> for Expr

source§

fn from(v: LogicalNot) -> Self

Converts to this type from the input type.
source§

impl From<LongToByteArray> for Expr

source§

fn from(original: LongToByteArray) -> Expr

Converts to this type from the input type.
source§

impl From<Map> for Expr

source§

fn from(v: Map) -> Self

Converts to this type from the input type.
source§

impl From<MethodCall> for Expr

source§

fn from(v: MethodCall) -> Self

Converts to this type from the input type.
source§

impl From<MultiplyGroup> for Expr

source§

fn from(original: MultiplyGroup) -> Expr

Converts to this type from the input type.
source§

impl From<Negation> for Expr

source§

fn from(v: Negation) -> Self

Converts to this type from the input type.
source§

impl From<OptionGet> for Expr

source§

fn from(v: OptionGet) -> Self

Converts to this type from the input type.
source§

impl From<OptionGetOrElse> for Expr

source§

fn from(v: OptionGetOrElse) -> Self

Converts to this type from the input type.
source§

impl From<OptionIsDefined> for Expr

source§

fn from(v: OptionIsDefined) -> Self

Converts to this type from the input type.
source§

impl From<Or> for Expr

source§

fn from(v: Or) -> Self

Converts to this type from the input type.
source§

impl From<PropertyCall> for Expr

source§

fn from(v: PropertyCall) -> Self

Converts to this type from the input type.
source§

impl From<SelectField> for Expr

source§

fn from(v: SelectField) -> Self

Converts to this type from the input type.
source§

impl From<SigmaAnd> for Expr

source§

fn from(original: SigmaAnd) -> Expr

Converts to this type from the input type.
source§

impl From<SigmaOr> for Expr

source§

fn from(original: SigmaOr) -> Expr

Converts to this type from the input type.
source§

impl From<SigmaPropBytes> for Expr

source§

fn from(original: SigmaPropBytes) -> Expr

Converts to this type from the input type.
source§

impl From<SizeOf> for Expr

source§

fn from(original: SizeOf) -> Expr

Converts to this type from the input type.
source§

impl From<Slice> for Expr

source§

fn from(v: Slice) -> Self

Converts to this type from the input type.
source§

impl From<Spanned<And>> for Expr

source§

fn from(original: Spanned<And>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Append>> for Expr

source§

fn from(original: Spanned<Append>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<BinOp>> for Expr

source§

fn from(original: Spanned<BinOp>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<BlockValue>> for Expr

source§

fn from(original: Spanned<BlockValue>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<ByIndex>> for Expr

source§

fn from(original: Spanned<ByIndex>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<ByteArrayToBigInt>> for Expr

source§

fn from(original: Spanned<ByteArrayToBigInt>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<ByteArrayToLong>> for Expr

source§

fn from(original: Spanned<ByteArrayToLong>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Exists>> for Expr

source§

fn from(original: Spanned<Exists>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<ExtractRegisterAs>> for Expr

source§

fn from(original: Spanned<ExtractRegisterAs>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Filter>> for Expr

source§

fn from(original: Spanned<Filter>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Fold>> for Expr

source§

fn from(original: Spanned<Fold>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<ForAll>> for Expr

source§

fn from(original: Spanned<ForAll>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<GetVar>> for Expr

source§

fn from(original: Spanned<GetVar>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<LogicalNot>> for Expr

source§

fn from(original: Spanned<LogicalNot>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Map>> for Expr

source§

fn from(original: Spanned<Map>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<MethodCall>> for Expr

source§

fn from(original: Spanned<MethodCall>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Negation>> for Expr

source§

fn from(original: Spanned<Negation>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<OptionGet>> for Expr

source§

fn from(original: Spanned<OptionGet>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<OptionGetOrElse>> for Expr

source§

fn from(original: Spanned<OptionGetOrElse>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<OptionIsDefined>> for Expr

source§

fn from(original: Spanned<OptionIsDefined>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Or>> for Expr

source§

fn from(original: Spanned<Or>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<PropertyCall>> for Expr

source§

fn from(original: Spanned<PropertyCall>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<SelectField>> for Expr

source§

fn from(original: Spanned<SelectField>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<Slice>> for Expr

source§

fn from(original: Spanned<Slice>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<SubstConstants>> for Expr

source§

fn from(original: Spanned<SubstConstants>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<TreeLookup>> for Expr

source§

fn from(original: Spanned<TreeLookup>) -> Expr

Converts to this type from the input type.
source§

impl From<Spanned<ValDef>> for Expr

source§

fn from(original: Spanned<ValDef>) -> Expr

Converts to this type from the input type.
source§

impl From<SubstConstants> for Expr

source§

fn from(v: SubstConstants) -> Self

Converts to this type from the input type.
source§

impl<T: Into<Literal> + LiftIntoSType> From<T> for Expr

source§

fn from(t: T) -> Self

Converts to this type from the input type.
source§

impl From<TreeLookup> for Expr

source§

fn from(v: TreeLookup) -> Self

Converts to this type from the input type.
source§

impl From<Tuple> for Expr

source§

fn from(original: Tuple) -> Expr

Converts to this type from the input type.
source§

impl From<Upcast> for Expr

source§

fn from(original: Upcast) -> Expr

Converts to this type from the input type.
source§

impl From<ValDef> for Expr

source§

fn from(v: ValDef) -> Self

Converts to this type from the input type.
source§

impl From<ValUse> for Expr

source§

fn from(original: ValUse) -> Expr

Converts to this type from the input type.
source§

impl From<Xor> for Expr

source§

fn from(original: Xor) -> Expr

Converts to this type from the input type.
source§

impl From<XorOf> for Expr

source§

fn from(original: XorOf) -> Expr

Converts to this type from the input type.
source§

impl PartialEq for Expr

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Print for Expr

source§

fn print(&self, w: &mut dyn Printer) -> Result<Expr, PrintError>

Print the expression and return the resulting expression with source span
source§

impl SigmaSerializable for Expr

source§

fn sigma_serialize<W: SigmaByteWrite>(&self, w: &mut W) -> SigmaSerializeResult

Write 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>

Try to read self from the given reader. sigma- prefix to alert the reader that the serialization in use is consensus-critical
source§

fn sigma_serialize_bytes(&self) -> Result<Vec<u8>, SigmaSerializationError>

Serialize any SigmaSerializable value into bytes
source§

fn sigma_parse_bytes(bytes: &[u8]) -> Result<Self, SigmaParsingError>

Parse self from the bytes
source§

impl TryFrom<Expr> for ()

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Apply

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Atleast

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for BitInversion

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for BoolToSigmaProp

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for CalcBlake2b256

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for CalcSha256

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Collection

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Constant

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ConstantPlaceholder

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for CreateAvlTree

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for CreateProveDhTuple

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for CreateProveDlog

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for DecodePoint

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for DeserializeContext

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for DeserializeRegister

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Downcast

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ErgoTree

§

type Error = ErgoTreeError

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

fn try_from(expr: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Exponentiate

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ExtractAmount

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ExtractBytes

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ExtractBytesWithNoRef

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ExtractCreationInfo

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ExtractId

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ExtractScriptBytes

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for FuncValue

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for GlobalVars

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for If

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for LongToByteArray

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for MultiplyGroup

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for SigmaAnd

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for SigmaOr

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for SigmaPropBytes

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for SizeOf

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<And>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Append>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<BinOp>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<BlockValue>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<ByIndex>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<ByteArrayToBigInt>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<ByteArrayToLong>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Exists>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<ExtractRegisterAs>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Filter>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Fold>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<ForAll>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<GetVar>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<LogicalNot>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Map>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<MethodCall>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Negation>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<OptionGet>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<OptionGetOrElse>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<OptionIsDefined>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Or>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<PropertyCall>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<SelectField>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<Slice>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<SubstConstants>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<TreeLookup>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Spanned<ValDef>

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Tuple

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Upcast

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for ValUse

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for Xor

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Expr> for XorOf

§

type Error = &'static str

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for Expr

source§

impl StructuralEq for Expr

source§

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

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

§

impl<D> OwoColorize for D

§

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

Set the foreground color generically Read more
§

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

Set the background color generically. Read more
§

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

Change the foreground color to black
§

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

Change the background color to black
§

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

Change the foreground color to red
§

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

Change the background color to red
§

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

Change the foreground color to green
§

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

Change the background color to green
§

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

Change the foreground color to yellow
§

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

Change the background color to yellow
§

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

Change the foreground color to blue
§

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

Change the background color to blue
§

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

Change the foreground color to magenta
§

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

Change the background color to magenta
§

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

Change the foreground color to purple
§

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

Change the background color to purple
§

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

Change the foreground color to cyan
§

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

Change the background color to cyan
§

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

Change the foreground color to white
§

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

Change the background color to white
§

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

Change the foreground color to the terminal default
§

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

Change the background color to the terminal default
§

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

Change the foreground color to bright black
§

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

Change the background color to bright black
§

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

Change the foreground color to bright red
§

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

Change the background color to bright red
§

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

Change the foreground color to bright green
§

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

Change the background color to bright green
§

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

Change the foreground color to bright yellow
§

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

Change the background color to bright yellow
§

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

Change the foreground color to bright blue
§

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

Change the background color to bright blue
§

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

Change the foreground color to bright magenta
§

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

Change the background color to bright magenta
§

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

Change the foreground color to bright purple
§

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

Change the background color to bright purple
§

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

Change the foreground color to bright cyan
§

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

Change the background color to bright cyan
§

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

Change the foreground color to bright white
§

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

Change the background color to bright white
§

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

Make the text bold
§

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

Make the text dim
§

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

Make the text italicized
§

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

Make the text italicized
Make the text blink
Make the text blink (but fast!)
§

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

Swap the foreground and background colors
§

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

Hide the text
§

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

Cross out the text
§

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
§

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
§

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

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

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

Sets the foreground color to an RGB value.
§

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

Sets the background color to an RGB value.
§

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

Apply a runtime-determined style
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows 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) -> R
where R: 'a,

Mutably borrows 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
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

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

§

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
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T> TryExtractFrom<Expr> for T
where T: TryFrom<Expr>,

source§

fn try_extract_from(v: Expr) -> Result<T, TryExtractFromError>

Extract the value or return an error if type does not match
source§

impl<F> TryExtractInto<F> for F

source§

fn try_extract_into<T>(self) -> Result<T, TryExtractFromError>
where T: TryExtractFrom<F>,

Extract value of the given type from any type (e.g. [‘Constant’], super::value::Value) on which TryExtractFrom is implemented
source§

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

§

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>,

§

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.