Struct coreledger_backend::model::Transaction
pub struct Transaction {
pub tx_id: TxId,
pub occured_on: u64,
pub events: Vec<TransactionEvent>,
}
Expand description
Details of the transaction.
Fields§
§tx_id: TxId
Unique id of the transacion.
occured_on: u64
Unix-time timestamp in nanoseconds when the transaction occured.
events: Vec<TransactionEvent>
List of events emitted within the transaction.
Implementations§
§impl Transaction
impl Transaction
pub fn new(tx_id: TxId, occured_on: u64) -> Self
pub fn add_event(&mut self, event: TransactionEvent)
Trait Implementations§
§impl CandidType for Transaction
impl CandidType for Transaction
§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for Transaction
impl Serialize for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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