pub(super) trait BookkeepableQty: Default {
const ZERO: Self;
// Required method
fn as_raw(&self) -> Qty;
}Expand description
Memory quantities that can work with bookkept quantities
This trait doesn’t imply any invariants; it merely provides read-only access to the underlying value, and ways to make a zero.
Used by the derived PartialEq and PartialOrd impls on bookkept quantities.
Implemented by hand for Qty.
Implemented for bookkept types, along with BookkeptQty, by
#[derive_deftly(BookKept)].
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".