Struct interviewpuzzle::ledger::transaction::Tx   [−][src]
pub struct Tx<State: TxState> {
    pub(crate) tx_type: TxType,
    pub(crate) client_id: u16,
    pub(crate) id: u32,
    pub(crate) amount: Option<Decimal>,
    pub state: State,
}Expand description
A single transaction.
This struct is used both for ser/deserializing by sered, and
by typestate crate to generate <TxState> for this struct.
Fields
tx_type: TxTypeclient_id: u16id: u32amount: Option<Decimal>state: StateTrait Implementations
impl<'de, State: TxState> Deserialize<'de> for Tx<State> where
    Tx<State>: Default,
    State: Deserialize<'de>, 
impl<'de, State: TxState> Deserialize<'de> for Tx<State> where
    Tx<State>: Default,
    State: Deserialize<'de>, 
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
Auto Trait Implementations
impl<State> RefUnwindSafe for Tx<State> where
    State: RefUnwindSafe, 
impl<State> UnwindSafe for Tx<State> where
    State: UnwindSafe, 
Blanket Implementations
Mutably borrows from an owned value. Read more