Skip to main content

DefaultFunction

Enum DefaultFunction 

Source
#[repr(u8)]
pub enum DefaultFunction {
Show 92 variants AddInteger = 0, SubtractInteger = 1, MultiplyInteger = 2, DivideInteger = 3, QuotientInteger = 4, RemainderInteger = 5, ModInteger = 6, EqualsInteger = 7, LessThanInteger = 8, LessThanEqualsInteger = 9, AppendByteString = 10, ConsByteString = 11, SliceByteString = 12, LengthOfByteString = 13, IndexByteString = 14, EqualsByteString = 15, LessThanByteString = 16, LessThanEqualsByteString = 17, Sha2_256 = 18, Sha3_256 = 19, Blake2b_256 = 20, Keccak_256 = 71, Blake2b_224 = 72, VerifyEd25519Signature = 21, VerifyEcdsaSecp256k1Signature = 52, VerifySchnorrSecp256k1Signature = 53, AppendString = 22, EqualsString = 23, EncodeUtf8 = 24, DecodeUtf8 = 25, IfThenElse = 26, ChooseUnit = 27, Trace = 28, FstPair = 29, SndPair = 30, ChooseList = 31, MkCons = 32, HeadList = 33, TailList = 34, NullList = 35, ChooseData = 36, ConstrData = 37, MapData = 38, ListData = 39, IData = 40, BData = 41, UnConstrData = 42, UnMapData = 43, UnListData = 44, UnIData = 45, UnBData = 46, EqualsData = 47, SerialiseData = 51, MkPairData = 48, MkNilData = 49, MkNilPairData = 50, Bls12_381_G1_Add = 54, Bls12_381_G1_Neg = 55, Bls12_381_G1_ScalarMul = 56, Bls12_381_G1_Equal = 57, Bls12_381_G1_Compress = 58, Bls12_381_G1_Uncompress = 59, Bls12_381_G1_HashToGroup = 60, Bls12_381_G2_Add = 61, Bls12_381_G2_Neg = 62, Bls12_381_G2_ScalarMul = 63, Bls12_381_G2_Equal = 64, Bls12_381_G2_Compress = 65, Bls12_381_G2_Uncompress = 66, Bls12_381_G2_HashToGroup = 67, Bls12_381_MillerLoop = 68, Bls12_381_MulMlResult = 69, Bls12_381_FinalVerify = 70, IntegerToByteString = 73, ByteStringToInteger = 74, AndByteString = 75, OrByteString = 76, XorByteString = 77, ComplementByteString = 78, ReadBit = 79, WriteBits = 80, ReplicateByte = 81, ShiftByteString = 82, RotateByteString = 83, CountSetBits = 84, FindFirstSetBit = 85, Ripemd_160 = 86, ExpModInteger = 87, DropList = 88, LengthOfArray = 89, ListToArray = 90, IndexArray = 91,
}

Variants§

§

AddInteger = 0

§

SubtractInteger = 1

§

MultiplyInteger = 2

§

DivideInteger = 3

§

QuotientInteger = 4

§

RemainderInteger = 5

§

ModInteger = 6

§

EqualsInteger = 7

§

LessThanInteger = 8

§

LessThanEqualsInteger = 9

§

AppendByteString = 10

§

ConsByteString = 11

§

SliceByteString = 12

§

LengthOfByteString = 13

§

IndexByteString = 14

§

EqualsByteString = 15

§

LessThanByteString = 16

§

LessThanEqualsByteString = 17

§

Sha2_256 = 18

§

Sha3_256 = 19

§

Blake2b_256 = 20

§

Keccak_256 = 71

§

Blake2b_224 = 72

§

VerifyEd25519Signature = 21

§

VerifyEcdsaSecp256k1Signature = 52

§

VerifySchnorrSecp256k1Signature = 53

§

AppendString = 22

§

EqualsString = 23

§

EncodeUtf8 = 24

§

DecodeUtf8 = 25

§

IfThenElse = 26

§

ChooseUnit = 27

§

Trace = 28

§

FstPair = 29

§

SndPair = 30

§

ChooseList = 31

§

MkCons = 32

§

HeadList = 33

§

TailList = 34

§

NullList = 35

§

ChooseData = 36

§

ConstrData = 37

§

MapData = 38

§

ListData = 39

§

IData = 40

§

BData = 41

§

UnConstrData = 42

§

UnMapData = 43

§

UnListData = 44

§

UnIData = 45

§

UnBData = 46

§

EqualsData = 47

§

SerialiseData = 51

§

MkPairData = 48

§

MkNilData = 49

§

MkNilPairData = 50

§

Bls12_381_G1_Add = 54

§

Bls12_381_G1_Neg = 55

§

Bls12_381_G1_ScalarMul = 56

§

Bls12_381_G1_Equal = 57

§

Bls12_381_G1_Compress = 58

§

Bls12_381_G1_Uncompress = 59

§

Bls12_381_G1_HashToGroup = 60

§

Bls12_381_G2_Add = 61

§

Bls12_381_G2_Neg = 62

§

Bls12_381_G2_ScalarMul = 63

§

Bls12_381_G2_Equal = 64

§

Bls12_381_G2_Compress = 65

§

Bls12_381_G2_Uncompress = 66

§

Bls12_381_G2_HashToGroup = 67

§

Bls12_381_MillerLoop = 68

§

Bls12_381_MulMlResult = 69

§

Bls12_381_FinalVerify = 70

§

IntegerToByteString = 73

§

ByteStringToInteger = 74

§

AndByteString = 75

§

OrByteString = 76

§

XorByteString = 77

§

ComplementByteString = 78

§

ReadBit = 79

§

WriteBits = 80

§

ReplicateByte = 81

§

ShiftByteString = 82

§

RotateByteString = 83

§

CountSetBits = 84

§

FindFirstSetBit = 85

§

Ripemd_160 = 86

§

ExpModInteger = 87

§

DropList = 88

§

LengthOfArray = 89

§

ListToArray = 90

§

IndexArray = 91

Implementations§

Source§

impl DefaultFunction

Source

pub fn force_count(&self) -> usize

Source

pub fn arity(&self) -> usize

Source

pub fn is_available_in(&self, plutus_version: PlutusVersion, pv: u32) -> bool

Check whether this builtin is available for a given Plutus ledger language and major protocol version.

Follows the Haskell’s builtinsIntroducedIn mapping from plutus-ledger-api: https://github.com/IntersectMBO/plutus/blob/master/plutus-ledger-api/src/PlutusLedgerApi/Common/Versions.hs

Trait Implementations§

Source§

impl Clone for DefaultFunction

Source§

fn clone(&self) -> DefaultFunction

Returns a duplicate 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 DefaultFunction

Source§

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

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

impl PartialEq for DefaultFunction

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for DefaultFunction

Source§

impl StructuralPartialEq for DefaultFunction

Auto Trait Implementations§

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

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.

Source§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

Source§

type Proj<U: 'src> = U

Source§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

Source§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

Source§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
Source§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
Source§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
Source§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
Source§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a MaybeRef.
Source§

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

Source§

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

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

Source§

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

Source§

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

impl<T> OrderedSeq<'_, T> for T
where T: Clone,