pub struct Ledger {Show 13 fields
pub context: String,
pub type: String,
pub id: String,
pub hash: String,
pub name: String,
pub default_currency: String,
pub genesis: Genesis,
pub updated: u64,
pub entries: Vec<Entry>,
pub deposits: Vec<Deposit>,
pub applied: Vec<String>,
pub payouts: Vec<Payout>,
pub extra: Map<String, Value>,
}Expand description
A Web Ledger as the teller writes it, field for field and in its order:
@context, type, id, hash, name, defaultCurrency, genesis,
updated, entries, deposits, applied, payouts. A ledger the
JavaScript teller wrote reads into this and serialises back to the same
JSON, and its genesis hashes the same.
Fields§
§context: String§type: String"WebLedger".
id: Stringurn:webledgers:<hash>.
hash: Stringhex(sha256(JCS(genesis))).
name: StringThe genesis’s name.
default_currency: StringThe genesis’s currency.
genesis: GenesisWhat the hash is of.
updated: u64Unix seconds of the last change.
entries: Vec<Entry>Balances, one per account.
deposits: Vec<Deposit>Every deposit credited.
applied: Vec<String>The ids of every request applied (transfers and withdrawals).
payouts: Vec<Payout>Every withdrawal paid.
extra: Map<String, Value>Fields this crate does not name, kept.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ledger
impl<'de> Deserialize<'de> for Ledger
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
impl Eq for Ledger
impl StructuralPartialEq for Ledger
Auto Trait Implementations§
impl Freeze for Ledger
impl RefUnwindSafe for Ledger
impl Send for Ledger
impl Sync for Ledger
impl Unpin for Ledger
impl UnsafeUnpin for Ledger
impl UnwindSafe for Ledger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.