Skip to main content

LayerFacts

Struct LayerFacts 

Source
pub struct LayerFacts {
    pub number: usize,
    pub count: usize,
    pub z_mm: f64,
    pub expected_colour: Option<String>,
    pub change: Option<ChangeFact>,
    pub progress: LayerProgress,
}
Expand description

What a check is told of the layer a job stands in: where it is among the file’s layers, the colour it should be laying, the planned change nearest it, and how far through the layer the job has sent.

Fields§

§number: usize

The layer’s number, counting the file’s first as 1.

§count: usize

How many layers the file plans.

§z_mm: f64

The layer’s height, in millimetres.

§expected_colour: Option<String>

The colour the job should be laying, as #RRGGBB, when the file plans a colour change and names the colour of the stretch the job is in; none for a file planning no change, whose sliced colour says nothing of the spool loaded.

§change: Option<ChangeFact>

The planned change just made before this layer, else the next one.

§progress: LayerProgress

How far through the layer the job has sent.

Implementations§

Source§

impl LayerFacts

Source

pub fn lines(&self) -> Vec<String>

The facts as three short lines of text, as a check’s turn is told them of panel 1: the layer, its colour and the planned change; how far through the layer the job has sent and the kinds sent; and the kinds still to print.

Trait Implementations§

Source§

impl Clone for LayerFacts

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 LayerFacts

Source§

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

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

impl PartialEq for LayerFacts

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 StructuralPartialEq for LayerFacts

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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.