pub enum Intrinsic {
Show 40 variants
ChaChaRand(LiteralType),
Commit(CommitVariant, LiteralType),
ECDSAVerify(ECDSAVerifyVariant),
Hash(HashVariant, Type),
Get,
Set,
MappingGetOrUse,
MappingRemove,
MappingContains,
OptionalUnwrap,
OptionalUnwrapOr,
VectorPush,
VectorLen,
VectorClear,
VectorPop,
VectorSwapRemove,
GroupToXCoordinate,
GroupToYCoordinate,
GroupGen,
SignatureVerify,
FutureAwait,
ProgramChecksum,
ProgramEdition,
ProgramOwner,
Serialize(SerializeVariant),
Deserialize(DeserializeVariant, Type),
SelfAddress,
SelfCaller,
SelfChecksum,
SelfEdition,
SelfId,
SelfProgramOwner,
SelfSigner,
BlockHeight,
BlockTimestamp,
NetworkId,
CheatCodePrintMapping,
CheatCodeSetBlockHeight,
CheatCodeSetBlockTimestamp,
CheatCodeSetSigner,
}Expand description
An instrinsic operation directly implemented by the compiler.
Variants§
ChaChaRand(LiteralType)
Commit(CommitVariant, LiteralType)
ECDSAVerify(ECDSAVerifyVariant)
Hash(HashVariant, Type)
Get
Set
MappingGetOrUse
MappingRemove
MappingContains
OptionalUnwrap
OptionalUnwrapOr
VectorPush
VectorLen
VectorClear
VectorPop
VectorSwapRemove
GroupToXCoordinate
GroupToYCoordinate
GroupGen
SignatureVerify
FutureAwait
ProgramChecksum
ProgramEdition
ProgramOwner
Serialize(SerializeVariant)
Deserialize(DeserializeVariant, Type)
SelfAddress
SelfCaller
SelfChecksum
SelfEdition
SelfId
SelfProgramOwner
SelfSigner
BlockHeight
BlockTimestamp
NetworkId
CheatCodePrintMapping
CheatCodeSetBlockHeight
CheatCodeSetBlockTimestamp
CheatCodeSetSigner
Implementations§
Source§impl Intrinsic
impl Intrinsic
Sourcepub fn from_symbol(
name: Symbol,
type_parameters: &[(Type, Span)],
) -> Option<Self>
pub fn from_symbol( name: Symbol, type_parameters: &[(Type, Span)], ) -> Option<Self>
Returns a Intrinsic from a single symbol.
Sourcepub fn convert_path_symbols(module: Symbol, function: Symbol) -> Option<Symbol>
pub fn convert_path_symbols(module: Symbol, function: Symbol) -> Option<Symbol>
Returns a Intrinsic from the given module and method symbols.
Sourcepub fn is_finalize_command(&self) -> bool
pub fn is_finalize_command(&self) -> bool
Returns whether or not this function is finalize command.
Trait Implementations§
impl Eq for Intrinsic
impl StructuralPartialEq for Intrinsic
Auto Trait Implementations§
impl Freeze for Intrinsic
impl RefUnwindSafe for Intrinsic
impl Send for Intrinsic
impl Sync for Intrinsic
impl Unpin for Intrinsic
impl UnwindSafe for Intrinsic
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more