pub struct Ledger {
pub customer_id: CustomerId,
pub pet_id: PetId,
/* private fields */
}Expand description
Training package ledger used to compute remaining reusable sessions without raw counters.
Fields§
§customer_id: CustomerIdSource-derived customer id carried by this training contract.
pet_id: PetIdPet receiving the grooming or care service.
Implementations§
Source§impl Ledger
impl Ledger
Sourcepub fn open(opening: OpeningLedger) -> Result<Self>
pub fn open(opening: OpeningLedger) -> Result<Self>
Opens a reusable package ledger after confirming the package policy has a session balance.
Sourcepub fn package_id(&self) -> &Id
pub fn package_id(&self) -> &Id
Returns the package id evidence recorded on this training contract.
Sourcepub fn entries(&self) -> &[LedgerEntry]
pub fn entries(&self) -> &[LedgerEntry]
Returns the entries evidence recorded on this training contract.
Sourcepub fn balance(&self) -> SessionBalance
pub fn balance(&self) -> SessionBalance
Returns the balance evidence recorded on this training contract.
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