Struct miden_objects::transaction::TransactionArgs
source · pub struct TransactionArgs { /* private fields */ }Expand description
A struct that represents optional transaction arguments.
Transaction arguments consist of:
- Transaction script: a program that is executed in a transaction after all input notes scripts have been executed..
- Note arguments: data put onto the the stack right before a note script is executed. These are different from note inputs, as the executing account can specify arbitrary note args.
Implementations§
source§impl TransactionArgs
impl TransactionArgs
sourcepub fn new(
tx_script: Option<TransactionScript>,
note_args: Option<BTreeMap<NoteId, Word>>
) -> Self
pub fn new( tx_script: Option<TransactionScript>, note_args: Option<BTreeMap<NoteId, Word>> ) -> Self
Returns a new instance of a TransactionArgs with the provided transaction script and note arguments.
pub fn with_tx_script(tx_script: TransactionScript) -> Self
pub fn with_note_args(not_args: BTreeMap<NoteId, Word>) -> Self
sourcepub fn tx_script(&self) -> Option<&TransactionScript>
pub fn tx_script(&self) -> Option<&TransactionScript>
Returns a reference to the transaction script.
sourcepub fn note_args(&self) -> Option<&BTreeMap<NoteId, Word>>
pub fn note_args(&self) -> Option<&BTreeMap<NoteId, Word>>
Returns a reference to the transaction script.
sourcepub fn get_note_args(&self, note_id: NoteId) -> Option<&Word>
pub fn get_note_args(&self, note_id: NoteId) -> Option<&Word>
Returns a reference to a specific note argument.
Trait Implementations§
source§impl Clone for TransactionArgs
impl Clone for TransactionArgs
source§fn clone(&self) -> TransactionArgs
fn clone(&self) -> TransactionArgs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for TransactionArgs
impl Debug for TransactionArgs
source§impl Default for TransactionArgs
impl Default for TransactionArgs
source§fn default() -> TransactionArgs
fn default() -> TransactionArgs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TransactionArgs
impl Send for TransactionArgs
impl Sync for TransactionArgs
impl Unpin for TransactionArgs
impl UnwindSafe for TransactionArgs
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