[−][src]Struct activeledger::Transaction
Transaction struct
Methods
impl Transaction
[src]
pub fn new(tx_data: &str) -> Transaction
[src]
Create a new transaction object
Takes a JSON string
The active_txbuilder crate can be used to generate the transaction data
Example
let tx = Transaction::new("{TX DATA HERE}");
Expected JSON structure
{
"$territoriality" : "" // Optional
"$tx" : {
"$namespace":"",
"$contract":"",
"$entry":"",
"$i":"",
"$o":"" // Optional
"$r":"" // Optional
},
"$selfsign" : true, // Optional
"$sigs" : {
"<identity>" : "<signature>"
}
}
More information about transaction data can be found in the Activeledger documentation here.
pub fn get_data(&self) -> &str
[src]
Get the transaction data
Returns a string reference
Auto Trait Implementations
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
impl RefUnwindSafe for Transaction
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,