[−][src]Struct ichen_openprotocol::StateValues
A data structure containing a snapshot of the current known states of the controller.
Fields
op_mode: OpMode
Current operating mold of the controller.
job_mode: JobMode
Current job mode of the controller.
operator_id: Option<NonZeroU32>
Unique ID of the current logged-in user (if any) on the controller.
job_card_id: Option<Cow<'a, str>>
Current active job ID (if any) on the controller.
mold_id: Option<Cow<'a, str>>
Unique ID of the set of mold data currently loaded (if any) on the controller.
Methods
impl<'a> StateValues<'a>
[src]
pub fn new(op: OpMode, job: JobMode) -> Self
[src]
Create a new StateValues
wth no operator ID, job card ID and mold ID.
pub fn new_with_all(
op: OpMode,
job: JobMode,
operator: Option<u32>,
job_card: Option<&'a str>,
mold: Option<&'a str>
) -> Self
[src]
op: OpMode,
job: JobMode,
operator: Option<u32>,
job_card: Option<&'a str>,
mold: Option<&'a str>
) -> Self
pub fn validate(&self) -> Result<'static, ()>
[src]
Validate the data structure.
Trait Implementations
impl<'_> Default for StateValues<'_>
[src]
impl<'a> PartialEq<StateValues<'a>> for StateValues<'a>
[src]
fn eq(&self, other: &StateValues<'a>) -> bool
[src]
fn ne(&self, other: &StateValues<'a>) -> bool
[src]
impl<'a> Debug for StateValues<'a>
[src]
impl<'a> Serialize for StateValues<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de: 'a, 'a> Deserialize<'de> for StateValues<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<'a> Sync for StateValues<'a>
impl<'a> Send for StateValues<'a>
impl<'a> Unpin for StateValues<'a>
impl<'a> RefUnwindSafe for StateValues<'a>
impl<'a> UnwindSafe for StateValues<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,