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>,
impl<T> ElementsEnv<T>where
T: Deref<Target = Transaction>,
pub fn new( tx: T, utxos: Vec<ElementsUtxo>, ix: u32, script_cmr: Cmr, control_block: ControlBlock, annex: Option<Vec<u8>>, genesis_hash: BlockHash, ) -> Self
Sourcepub fn c_tx_env(&self) -> &CElementsTxEnv
pub fn c_tx_env(&self) -> &CElementsTxEnv
Obtains the FFI compatible CTxEnv from self
Sourcepub fn tx(&self) -> &Transaction
pub fn tx(&self) -> &Transaction
Returns the transaction of this environment
Sourcepub fn control_block(&self) -> &ControlBlock
pub fn control_block(&self) -> &ControlBlock
Returns a reference to the control block of this ElementsEnv
.
Sourcepub fn genesis_hash(&self) -> BlockHash
pub fn genesis_hash(&self) -> BlockHash
Returns the genesis hash of this ElementsEnv
.
Trait Implementations§
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> 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