pub struct VersionedStock { /* private fields */ }Implementations§
Source§impl VersionedStock
impl VersionedStock
pub fn try_new( sku: Sku, total: Quantity, reserved: Quantity, version: Nat, ) -> DomainResult<Self>
pub const fn from_stock(stock: StockState, version: Nat) -> Self
pub const fn stock(&self) -> StockState
pub const fn version(&self) -> Nat
Trait Implementations§
Source§impl Clone for VersionedStock
impl Clone for VersionedStock
Source§fn clone(&self) -> VersionedStock
fn clone(&self) -> VersionedStock
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 VersionedStock
impl Debug for VersionedStock
Source§impl PartialEq for VersionedStock
impl PartialEq for VersionedStock
Source§fn eq(&self, other: &VersionedStock) -> bool
fn eq(&self, other: &VersionedStock) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for VersionedStock
impl Eq for VersionedStock
impl StructuralPartialEq for VersionedStock
Auto Trait Implementations§
impl Freeze for VersionedStock
impl RefUnwindSafe for VersionedStock
impl Send for VersionedStock
impl Sync for VersionedStock
impl Unpin for VersionedStock
impl UnsafeUnpin for VersionedStock
impl UnwindSafe for VersionedStock
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