Skip to main content

RepeatSkeleton

Struct RepeatSkeleton 

Source
pub struct RepeatSkeleton {
    pub name: &'static str,
    /* private fields */
}
Expand description

A compiled-contract family whose builds differ only by how many times one instruction block repeats (e.g. genesis0’s slot-mint emits one amount+script check per collection output). Matched as prefix · group×N · suffix with N >= min_repeats; the group’s pushes are per-repeat slots, so every arity of the family decodes to one name.

Fields§

§name: &'static str

Implementations§

Source§

impl RepeatSkeleton

Source

pub fn derive( name: &'static str, long: &[&[u8]], short: &[&[u8]], labels: &[&'static str], group_labels: &[&'static str], ) -> Option<RepeatSkeleton>

Derive from real instances of two different arities: long holds two or more instances of the bigger build, short at least one of the smaller. The repeated group is the shape difference between the two arities (rotated to its leftmost position, so trailing copies inside the longer build’s aligned prefix fold into repeats). Fixed-part pushes become constants only when every instance of both arities agrees — arity-dependent constants (output counts, indexes) become slots automatically. labels names the distinct fixed-part slots in first-occurrence order; group_labels names the group’s pushes in order (repeat a label to require equality within one repeat).

Source

pub fn params(&self) -> &[&'static str]

Fixed-part parameter labels, in order.

Source

pub fn group_params(&self) -> &[&'static str]

Per-repeat parameter labels, in order.

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> 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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.