pub struct Intervention {
pub id: InterventionId,
pub print_id: PrintId,
pub action_id: ActionId,
pub adjustable: Adjustable,
pub prior_value: Option<f64>,
pub applied_value: f64,
pub applied_at: Timestamp,
pub expires_at: Timestamp,
pub restored_at: Option<Timestamp>,
pub outcome: InterventionOutcome,
}Expand description
One adjustment made for a bounded time.
prior_value is read from the printer snapshot taken before the change, and
is absent when the printer reported none — in which case expiry restores
nothing and the outcome says so rather than guessing a default.
Fields§
§id: InterventionIdThis intervention’s identifier, minted by the store.
print_id: PrintIdThe print it was made against.
action_id: ActionIdThe action that asked for it.
adjustable: AdjustableWhat it changed.
prior_value: Option<f64>What the printer reported before the change, if it reported anything.
applied_value: f64What it was changed to.
applied_at: TimestampWhen it was applied.
expires_at: TimestampWhen it stops standing.
restored_at: Option<Timestamp>When the prior value was put back, if it was.
outcome: InterventionOutcomeWhat became of it.
Trait Implementations§
Source§impl Clone for Intervention
impl Clone for Intervention
Source§fn clone(&self) -> Intervention
fn clone(&self) -> Intervention
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 Intervention
impl Debug for Intervention
Source§impl<'de> Deserialize<'de> for Intervention
impl<'de> Deserialize<'de> for Intervention
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
Source§impl JsonSchema for Intervention
impl JsonSchema for Intervention
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for Intervention
impl PartialEq for Intervention
Source§impl Sample for Intervention
impl Sample for Intervention
Source§fn sample_full() -> Self
fn sample_full() -> Self
A value carrying every field the type declares.
Source§fn sample_minimal() -> Self
fn sample_minimal() -> Self
A value carrying every optional field absent.
Source§fn sample_alternates() -> Vec<Self>
fn sample_alternates() -> Vec<Self>
One value per further arm, for a type whose wire form is a union. Read more
Source§impl Serialize for Intervention
impl Serialize for Intervention
impl StructuralPartialEq for Intervention
Auto Trait Implementations§
impl Freeze for Intervention
impl RefUnwindSafe for Intervention
impl Send for Intervention
impl Sync for Intervention
impl Unpin for Intervention
impl UnsafeUnpin for Intervention
impl UnwindSafe for Intervention
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