Skip to main content

Term

Enum Term 

Source
pub enum Term<'a, V> {
    Var(&'a V),
    Lambda {
        parameter: &'a V,
        body: &'a Term<'a, V>,
    },
    Apply {
        function: &'a Term<'a, V>,
        argument: &'a Term<'a, V>,
    },
    Delay(&'a Term<'a, V>),
    Force(&'a Term<'a, V>),
    Case {
        constr: &'a Term<'a, V>,
        branches: &'a [&'a Term<'a, V>],
    },
    Constr {
        tag: usize,
        fields: &'a [&'a Term<'a, V>],
    },
    Constant(&'a Constant<'a>),
    Builtin(&'a DefaultFunction),
    Error,
}

Variants§

§

Var(&'a V)

§

Lambda

Fields

§parameter: &'a V
§body: &'a Term<'a, V>
§

Apply

Fields

§function: &'a Term<'a, V>
§argument: &'a Term<'a, V>
§

Delay(&'a Term<'a, V>)

§

Force(&'a Term<'a, V>)

§

Case

Fields

§constr: &'a Term<'a, V>
§branches: &'a [&'a Term<'a, V>]
§

Constr

Fields

§tag: usize
§fields: &'a [&'a Term<'a, V>]
§

Constant(&'a Constant<'a>)

§

Builtin(&'a DefaultFunction)

§

Error

Implementations§

Source§

impl<'a, V> Term<'a, V>

Source

pub fn var(arena: &'a Arena, i: &'a V) -> &'a Term<'a, V>

Source

pub fn apply( &'a self, arena: &'a Arena, argument: &'a Term<'a, V>, ) -> &'a Term<'a, V>

Source

pub fn lambda(&'a self, arena: &'a Arena, parameter: &'a V) -> &'a Term<'a, V>

Source

pub fn force(&'a self, arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn delay(&'a self, arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn constant(arena: &'a Arena, constant: &'a Constant<'a>) -> &'a Term<'a, V>

Source

pub fn constr( arena: &'a Arena, tag: usize, fields: &'a [&'a Term<'a, V>], ) -> &'a Term<'a, V>

Source

pub fn case( arena: &'a Arena, constr: &'a Term<'a, V>, branches: &'a [&'a Term<'a, V>], ) -> &'a Term<'a, V>

Source

pub fn integer(arena: &'a Arena, i: &'a Integer) -> &'a Term<'a, V>

Source

pub fn integer_from(arena: &'a Arena, i: i128) -> &'a Term<'a, V>

Source

pub fn byte_string(arena: &'a Arena, bytes: &'a [u8]) -> &'a Term<'a, V>

Source

pub fn string(arena: &'a Arena, s: &'a str) -> &'a Term<'a, V>

Source

pub fn bool(arena: &'a Arena, v: bool) -> &'a Term<'a, V>

Source

pub fn data(arena: &'a Arena, d: &'a PlutusData<'a>) -> &'a Term<'a, V>

Source

pub fn data_byte_string(arena: &'a Arena, bytes: &'a [u8]) -> &'a Term<'a, V>

Source

pub fn data_integer(arena: &'a Arena, i: &'a Integer) -> &'a Term<'a, V>

Source

pub fn data_integer_from(arena: &'a Arena, i: i128) -> &'a Term<'a, V>

Source

pub fn unit(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn builtin(arena: &'a Arena, fun: &'a DefaultFunction) -> &'a Term<'a, V>

Source

pub fn error(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn add_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn multiply_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn divide_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn quotient_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn remainder_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn mod_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn subtract_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn equals_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn less_than_equals_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn less_than_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn if_then_else(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn append_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn equals_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn cons_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn slice_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn length_of_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn index_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn less_than_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn less_than_equals_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn sha2_256(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn sha3_256(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn blake2b_256(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn keccak_256(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn blake2b_224(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn verify_ed25519_signature(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn verify_ecdsa_secp256k1_signature(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn verify_schnorr_secp256k1_signature(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn append_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn equals_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn encode_utf8(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn decode_utf8(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn choose_unit(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn trace(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn fst_pair(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn snd_pair(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn choose_list(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn mk_cons(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn head_list(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn tail_list(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn null_list(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn choose_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn constr_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn map_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn list_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn i_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn b_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn un_constr_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn un_map_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn un_list_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn un_i_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn un_b_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn equals_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn mk_pair_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn mk_nil_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn mk_nil_pair_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn serialise_data(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_add(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_neg(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_scalar_mul(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_equal(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_compress(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_uncompress(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g1_hash_to_group(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_add(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_neg(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_scalar_mul(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_equal(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_compress(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_uncompress(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_g2_hash_to_group(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_miller_loop(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_mul_ml_result(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn bls12_381_final_verify(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn integer_to_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn byte_string_to_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn and_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn or_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn xor_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn complement_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn read_bit(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn write_bits(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn replicate_byte(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn shift_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn rotate_byte_string(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn count_set_bits(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn find_first_set_bit(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn ripemd_160(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn exp_mod_integer(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn drop_list(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn length_of_array(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn list_to_array(arena: &'a Arena) -> &'a Term<'a, V>

Source

pub fn index_array(arena: &'a Arena) -> &'a Term<'a, V>

Trait Implementations§

Source§

impl<'a, V: Clone> Clone for Term<'a, V>

Source§

fn clone(&self) -> Term<'a, V>

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<'a, V: Debug> Debug for Term<'a, V>

Source§

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

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

impl<'a, V: PartialEq> PartialEq for Term<'a, V>

Source§

fn eq(&self, other: &Term<'a, V>) -> 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<'a, V> StructuralPartialEq for Term<'a, V>

Auto Trait Implementations§

§

impl<'a, V> Freeze for Term<'a, V>

§

impl<'a, V> RefUnwindSafe for Term<'a, V>
where V: RefUnwindSafe,

§

impl<'a, V> Send for Term<'a, V>
where V: Sync,

§

impl<'a, V> Sync for Term<'a, V>
where V: Sync,

§

impl<'a, V> Unpin for Term<'a, V>

§

impl<'a, V> UnsafeUnpin for Term<'a, V>

§

impl<'a, V> UnwindSafe for Term<'a, V>
where V: RefUnwindSafe,

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,