pub struct JournalEntry {
pub seq: u64,
pub prev_hash: [u8; 32],
pub ts: u64,
pub op: Op,
pub result: Result<TransferResult, LedgerError>,
}Expand description
One committed operation in the hash chain. prev_hash links it to the prior
entry; the outcome is in the chain too (plan §2a step 3), so tampering with
a result breaks the chain.
Fields§
§seq: u64Monotonic sequence, starting at 1.
prev_hash: [u8; 32]Hash of entry seq - 1 ([0u8; 32] for the genesis entry).
ts: u64Logical commit timestamp.
op: OpThe op that was applied.
result: Result<TransferResult, LedgerError>The recorded result (Ok summary or the deterministic error).
Implementations§
Source§impl JournalEntry
impl JournalEntry
Trait Implementations§
Source§impl Clone for JournalEntry
impl Clone for JournalEntry
Source§fn clone(&self) -> JournalEntry
fn clone(&self) -> JournalEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 JournalEntry
impl Debug for JournalEntry
Source§impl<'de> Deserialize<'de> for JournalEntry
impl<'de> Deserialize<'de> for JournalEntry
Source§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
Source§impl PartialEq for JournalEntry
impl PartialEq for JournalEntry
Source§fn eq(&self, other: &JournalEntry) -> bool
fn eq(&self, other: &JournalEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for JournalEntry
impl Serialize for JournalEntry
impl Eq for JournalEntry
impl StructuralPartialEq for JournalEntry
Auto Trait Implementations§
impl Freeze for JournalEntry
impl RefUnwindSafe for JournalEntry
impl Send for JournalEntry
impl Sync for JournalEntry
impl Unpin for JournalEntry
impl UnsafeUnpin for JournalEntry
impl UnwindSafe for JournalEntry
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