pub struct ActionBody {Show 15 fields
pub reason: Option<String>,
pub actor: Actor,
pub duration_s: Option<i64>,
pub factor: Option<f64>,
pub target_c: Option<f64>,
pub percent: Option<f64>,
pub tool: Option<i64>,
pub file_name: Option<FileName>,
pub manifest: Option<JobManifest>,
pub override_filament_check: bool,
pub override_material_check: bool,
pub override_sheet_check: bool,
pub event_id: Option<EventId>,
pub disposition: Option<AcknowledgementDisposition>,
pub outcome: Option<PrintOutcome>,
}Expand description
One request for one action of the vocabulary.
Every mutating operation takes this shape: the reason it carries, who is asking, the optional duration a bounded change stands for, and whichever of the values the asked-for action needs. A field the action does not need is ignored; a field it needs and the request omits is refused naming it, and a request carrying no reason is refused before anything reaches the printer or the record.
Fields§
§reason: Option<String>Why the actor is asking for this.
actor: ActorWho is asking.
duration_s: Option<i64>How long the change stands for, in whole seconds.
factor: Option<f64>The multiplier a feedrate or flowrate adjustment asks for.
target_c: Option<f64>The temperature a heater adjustment asks for.
percent: Option<f64>The percentage a fan adjustment asks for.
tool: Option<i64>The tool a tool adjustment is about.
file_name: Option<FileName>The file a start asks for.
manifest: Option<JobManifest>The manifest a start is bounded by.
override_filament_check: boolWhether a start goes ahead despite the filament check; absent, it does not.
override_material_check: boolWhether a start goes ahead despite the material check; absent, it does not.
override_sheet_check: boolWhether a start goes ahead despite the sheet check; absent, it does not.
event_id: Option<EventId>The event an acknowledgement is about.
disposition: Option<AcknowledgementDisposition>What an acknowledgement asks for next.
outcome: Option<PrintOutcome>How a closed print ended, in the operator’s judgement.
Implementations§
Source§impl ActionBody
impl ActionBody
Sourcepub fn reason(&self) -> Result<String, BodyRefusal>
pub fn reason(&self) -> Result<String, BodyRefusal>
The reason this request carries, refused when it carries none.
§Errors
Returns BodyRefusal when the reason is absent or is nothing but
whitespace. Every mutating operation carries a reason, and this is
checked before the action is assembled, so a request without one reaches
neither the policy, the printer nor the record.
Sourcepub fn into_action(self, kind: ActionKind) -> Result<PrintAction, BodyRefusal>
pub fn into_action(self, kind: ActionKind) -> Result<PrintAction, BodyRefusal>
The action this request asks for.
§Errors
Returns BodyRefusal naming the value the asked-for action needs and
the request does not carry, and naming the absent reason before
anything else.
Trait Implementations§
Source§impl Clone for ActionBody
impl Clone for ActionBody
Source§impl Debug for ActionBody
impl Debug for ActionBody
Source§impl<'de> Deserialize<'de> for ActionBody
impl<'de> Deserialize<'de> for ActionBody
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>,
Source§impl PartialEq for ActionBody
impl PartialEq for ActionBody
impl StructuralPartialEq for ActionBody
Auto Trait Implementations§
impl Forget for ActionBody
impl Freeze for ActionBody
impl Move for ActionBody
impl RefUnwindSafe for ActionBody
impl Send for ActionBody
impl Sync for ActionBody
impl Unpin for ActionBody
impl UnsafeUnpin for ActionBody
impl UnwindSafe for ActionBody
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.