Skip to main content

PrintAction

Enum PrintAction 

Source
pub enum PrintAction {
    Pause {
        actor: Actor,
        reason: String,
    },
    Resume {
        actor: Actor,
        reason: String,
    },
    Cancel {
        actor: Actor,
        reason: String,
    },
    StartPrint {
        actor: Actor,
        file_name: FileName,
        manifest: JobManifest,
        override_filament_check: Option<bool>,
        reason: String,
    },
    SetFeedrateFactor {
        actor: Actor,
        duration_s: Option<i64>,
        factor: f64,
        reason: String,
    },
    SetFlowrateFactor {
        actor: Actor,
        duration_s: Option<i64>,
        factor: f64,
        reason: String,
    },
    SetToolTargetC {
        actor: Actor,
        duration_s: Option<i64>,
        reason: String,
        target_c: f64,
        tool: i64,
    },
    SetBedTargetC {
        actor: Actor,
        duration_s: Option<i64>,
        reason: String,
        target_c: f64,
    },
    SetFanPercent {
        actor: Actor,
        duration_s: Option<i64>,
        percent: f64,
        reason: String,
    },
    AcknowledgeFailure {
        actor: Actor,
        disposition: AcknowledgementDisposition,
        event_id: EventId,
        reason: String,
    },
}
Expand description

The whole vocabulary an actor may ask for, and there is no other.

Variants§

§

Pause

Pause the print.

Fields

§actor: Actor

Who is asking.

§reason: String

Why the actor is asking for this.

§

Resume

Resume the print.

Fields

§actor: Actor

Who is asking.

§reason: String

Why the actor is asking for this.

§

Cancel

Cancel the print.

Fields

§actor: Actor

Who is asking.

§reason: String

Why the actor is asking for this.

§

StartPrint

Start a print of a named file, with a manifest.

Fields

§actor: Actor

Who is asking.

§file_name: FileName

The file to print, validated as a name a file API can be asked for.

§manifest: JobManifest

The manifest this print is bounded by.

§override_filament_check: Option<bool>

Start despite an insufficient or unverified spool, or a file OctoPrint has not analysed; the start’s own reason is the override’s reason.

§reason: String

Why the actor is asking for this.

§

SetFeedrateFactor

Set the feedrate factor, where one means one hundred percent.

Fields

§actor: Actor

Who is asking.

§duration_s: Option<i64>

How long the change stands for, in whole seconds.

§factor: f64

The multiplier asked for.

§reason: String

Why the actor is asking for this.

§

SetFlowrateFactor

Set the flowrate factor, where one means one hundred percent.

Fields

§actor: Actor

Who is asking.

§duration_s: Option<i64>

How long the change stands for, in whole seconds.

§factor: f64

The multiplier asked for.

§reason: String

Why the actor is asking for this.

§

SetToolTargetC

Set one tool’s target temperature.

Fields

§actor: Actor

Who is asking.

§duration_s: Option<i64>

How long the change stands for, in whole seconds.

§reason: String

Why the actor is asking for this.

§target_c: f64

The target temperature asked for, in degrees Celsius.

§tool: i64

The tool, in the printer’s own numbering.

§

SetBedTargetC

Set the bed’s target temperature.

Fields

§actor: Actor

Who is asking.

§duration_s: Option<i64>

How long the change stands for, in whole seconds.

§reason: String

Why the actor is asking for this.

§target_c: f64

The target temperature asked for, in degrees Celsius.

§

SetFanPercent

Set the part-cooling fan percentage.

Fields

§actor: Actor

Who is asking.

§duration_s: Option<i64>

How long the change stands for, in whole seconds.

§percent: f64

The percentage asked for.

§reason: String

Why the actor is asking for this.

§

AcknowledgeFailure

Acknowledge a failure event, with a disposition.

Fields

§actor: Actor

Who is asking.

§disposition: AcknowledgementDisposition

What to do next.

§event_id: EventId

The event being acknowledged.

§reason: String

Why the actor is asking for this.

Trait Implementations§

Source§

impl Clone for PrintAction

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PrintAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PrintAction

Source§

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 PartialEq for PrintAction

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PrintAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PrintAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.