Skip to main content

DecisionInput

Struct DecisionInput 

Source
pub struct DecisionInput<'a> {
    pub action: &'a PrintAction,
    pub actor: &'a Actor,
    pub requested_at: Timestamp,
    pub print: Option<&'a PrintRecord>,
    pub printer_state: Option<&'a PrinterState>,
    pub bounds: &'a EffectiveBounds,
    pub envelope: &'a SafetyEnvelope,
    pub since_last_agent_action: Option<Duration>,
}
Expand description

Everything one decision is taken from.

Fields§

§action: &'a PrintAction

What is being asked for.

§actor: &'a Actor

Who is asking.

§requested_at: Timestamp

When they asked.

§print: Option<&'a PrintRecord>

The print it is being asked against, when there is one.

§printer_state: Option<&'a PrinterState>

The state to judge this request from, when there is one to judge it from.

Absent means the state check does not apply: either no snapshot could be taken, or the request is a restoration, which is the closing half of a change this policy already accepted rather than a fresh request for a machine change — the state that justified the original check is by definition the state that has just ended. The bounds check applies to a restoration exactly as it does to the request that opened it.

§bounds: &'a EffectiveBounds

The bounds in force for this print.

§envelope: &'a SafetyEnvelope

The operator’s safety envelope.

§since_last_agent_action: Option<Duration>

How long ago the agent last changed the machine on this print, if it has, measured on Clock::elapsed — time passing rather than the wall clock moving, so that a host’s time synchronisation stepping the wall clock neither lets the agent act again early nor holds it back longer than the interval.

Trait Implementations§

Source§

impl<'a> Clone for DecisionInput<'a>

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<'a> Copy for DecisionInput<'a>

Source§

impl<'a> Debug for DecisionInput<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for DecisionInput<'a>

§

impl<'a> Freeze for DecisionInput<'a>

§

impl<'a> RefUnwindSafe for DecisionInput<'a>

§

impl<'a> Send for DecisionInput<'a>

§

impl<'a> Sync for DecisionInput<'a>

§

impl<'a> Unpin for DecisionInput<'a>

§

impl<'a> UnsafeUnpin for DecisionInput<'a>

§

impl<'a> UnwindSafe for DecisionInput<'a>

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.