pub struct Charge {
pub key: ChargeKey,
pub tool: i64,
pub print_id: Option<PrintId>,
pub spool_id: Option<SpoolId>,
pub length_mm: f64,
pub grams: Option<f64>,
pub at: Timestamp,
pub event: EventDraft,
}Expand description
One debit on its way into the store.
Fields§
§key: ChargeKeyThe durable identity of the debit.
tool: i64The tool that fed the filament, in the printer’s own numbering.
print_id: Option<PrintId>The print it was fed in, when it was fed in one this system recorded.
spool_id: Option<SpoolId>The spool charged; absent when nothing was tracked on the tool, and the filament is recorded uncharged.
length_mm: f64How much was fed, in millimetres.
grams: Option<f64>What that weighs, in grams; what is subtracted from the spool.
at: TimestampWhen the charge was taken.
event: EventDraftIts filament_consumed event.
Trait Implementations§
impl StructuralPartialEq for Charge
Auto Trait Implementations§
impl Freeze for Charge
impl RefUnwindSafe for Charge
impl Send for Charge
impl Sync for Charge
impl Unpin for Charge
impl UnsafeUnpin for Charge
impl UnwindSafe for Charge
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