#[repr(C)]pub struct UnitStatus { /* private fields */ }Expand description
Represents the status of a JCM device unit, e.g. Acceptor, Stacker, Recycler, etc.
Implementations§
Source§impl UnitStatus
impl UnitStatus
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new UnitStatus.
Sourcepub const fn unit_number(&self) -> UnitNumber
pub const fn unit_number(&self) -> UnitNumber
Gets the UnitNumber of the UnitStatus.
Sourcepub fn set_unit_number(&mut self, val: UnitNumber)
pub fn set_unit_number(&mut self, val: UnitNumber)
Sets the UnitNumber of the UnitStatus.
Sourcepub fn with_unit_number(self, val: UnitNumber) -> Self
pub fn with_unit_number(self, val: UnitNumber) -> Self
Builder function that sets the UnitNumber of the UnitStatus.
Sourcepub const fn function_status(&self) -> FunctionStatus
pub const fn function_status(&self) -> FunctionStatus
Gets the FunctionStatus of the UnitStatus.
Sourcepub fn set_function_status(&mut self, val: FunctionStatus)
pub fn set_function_status(&mut self, val: FunctionStatus)
Sets the FunctionStatus of the UnitStatus.
Sourcepub fn with_function_status(self, val: FunctionStatus) -> Self
pub fn with_function_status(self, val: FunctionStatus) -> Self
Builder function that sets the FunctionStatus of the UnitStatus.
Sourcepub const fn len() -> usize
pub const fn len() -> usize
Gets the length of the UnitStatus.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Gets whether the UnitStatus is empty.
Sourcepub const fn is_valid(&self) -> bool
pub const fn is_valid(&self) -> bool
Gets whether the UnitStatus is valid.
Sourcepub const fn from_bytes(val: &[u8]) -> Self
pub const fn from_bytes(val: &[u8]) -> Self
Infallible function that converts a byte array into a UnitStatus.
Sourcepub const fn to_bytes(&self) -> [u8; 2]
pub const fn to_bytes(&self) -> [u8; 2]
Infallible function that converts a UnitStatus into a byte array.
Sourcepub const fn into_bytes(self) -> [u8; 2]
pub const fn into_bytes(self) -> [u8; 2]
Infallible function that converts a UnitStatus into a byte array.
Trait Implementations§
Source§impl Clone for UnitStatus
impl Clone for UnitStatus
Source§fn clone(&self) -> UnitStatus
fn clone(&self) -> UnitStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnitStatus
impl Debug for UnitStatus
Source§impl Default for UnitStatus
impl Default for UnitStatus
Source§impl Display for UnitStatus
impl Display for UnitStatus
Source§impl PartialEq for UnitStatus
impl PartialEq for UnitStatus
Source§impl TryFrom<&[u8]> for UnitStatus
impl TryFrom<&[u8]> for UnitStatus
impl Copy for UnitStatus
impl Eq for UnitStatus
impl StructuralPartialEq for UnitStatus
Auto Trait Implementations§
impl Freeze for UnitStatus
impl RefUnwindSafe for UnitStatus
impl Send for UnitStatus
impl Sync for UnitStatus
impl Unpin for UnitStatus
impl UnwindSafe for UnitStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more