[][src]Struct ichen_openprotocol::JobCard

pub struct JobCard<'a> {
    pub job_card_id: Cow<'a, str>,
    pub mold_id: Cow<'a, str>,
    pub progress: u32,
    pub total: u32,
}

A data structure containing information on a production job (i.e. a job card).

Fields

job_card_id: Cow<'a, str>

Unique job ID, which must not be empty or all white-spaces.

mold_id: Cow<'a, str>

ID of the set of mold data to load for this job.

progress: u32

Current production progress, which must not be larger than total.

total: u32

Total production count ordered.

Methods

impl<'a> JobCard<'a>[src]

pub fn new(id: &'a str, mold: &'a str, progress: u32, total: u32) -> Self[src]

pub fn validate(&self) -> Result<'static, ()>[src]

Validate the data structure.

Trait Implementations

impl<'a> Clone for JobCard<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> PartialEq<JobCard<'a>> for JobCard<'a>[src]

impl<'a> Debug for JobCard<'a>[src]

impl<'a> Serialize for JobCard<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for JobCard<'a>[src]

Auto Trait Implementations

impl<'a> Sync for JobCard<'a>

impl<'a> Send for JobCard<'a>

impl<'a> Unpin for JobCard<'a>

impl<'a> RefUnwindSafe for JobCard<'a>

impl<'a> UnwindSafe for JobCard<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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