Struct ElementsEnv

Source
pub struct ElementsEnv<T: Deref<Target = Transaction>> { /* private fields */ }
Expand description

Environment for Elements Simplicity

§Note

The order of utxos must be same as of the order of inputs in the transaction.

Implementations§

Source§

impl<T> ElementsEnv<T>
where T: Deref<Target = Transaction>,

Source

pub fn new( tx: T, utxos: Vec<ElementsUtxo>, ix: u32, script_cmr: Cmr, control_block: ControlBlock, annex: Option<Vec<u8>>, genesis_hash: BlockHash, ) -> Self

Source

pub fn c_tx_env(&self) -> &CElementsTxEnv

Obtains the FFI compatible CTxEnv from self

Source

pub fn tx(&self) -> &Transaction

Returns the transaction of this environment

Source

pub fn ix(&self) -> u32

Returns the input index of this environment

Source

pub fn control_block(&self) -> &ControlBlock

Returns a reference to the control block of this ElementsEnv.

Source

pub fn annex(&self) -> Option<&Vec<u8>>

Returns the annex of this ElementsEnv.

Source

pub fn genesis_hash(&self) -> BlockHash

Returns the genesis hash of this ElementsEnv.

Trait Implementations§

Source§

impl<T: Debug + Deref<Target = Transaction>> Debug for ElementsEnv<T>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for ElementsEnv<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for ElementsEnv<T>
where T: RefUnwindSafe,

§

impl<T> !Send for ElementsEnv<T>

§

impl<T> !Sync for ElementsEnv<T>

§

impl<T> Unpin for ElementsEnv<T>
where T: Unpin,

§

impl<T> UnwindSafe for ElementsEnv<T>
where T: UnwindSafe,

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 = 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V