Struct ledger_mob_apdu::tx::TxInfo
source · pub struct TxInfo {
pub state: TxState,
pub value: u16,
pub digest: Digest,
}
Expand description
Transaction information response APDU.
Received in response to TX commands, contains the current transaction engine state, a value where relevant (ie. ring index when streaming rings), and a digest over operations in the transaction to mitigate state errors.
Encoding:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TX_STATE | VALUE |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TX_DIGEST |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§state: TxState
Current transaction engine state
value: u16
Value associated with current state (zero otherwise)
digest: Digest
Transaction state digest
Trait Implementations§
source§impl PartialEq<TxInfo> for TxInfo
impl PartialEq<TxInfo> for TxInfo
impl StructuralPartialEq for TxInfo
Auto Trait Implementations§
impl RefUnwindSafe for TxInfo
impl Send for TxInfo
impl Sync for TxInfo
impl Unpin for TxInfo
impl UnwindSafe for TxInfo
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
§impl<'a, T> DecodeExt<'a> for Twhere
T: Decode<'a>,
impl<'a, T> DecodeExt<'a> for Twhere T: Decode<'a>,
§fn decode_iter(buff: &'a [u8]) -> DecodeIter<'a, Self::Output>
fn decode_iter(buff: &'a [u8]) -> DecodeIter<'a, Self::Output>
Helper to iterate over decodable objects in a sized buffer. Read more