Struct jcm::UnitNumber
source · #[repr(C)]pub struct UnitNumber(/* private fields */);Expand description
Implementations§
source§impl UnitNumber
impl UnitNumber
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new UnitNumber.
sourcepub const fn func_id(&self) -> FuncId
pub const fn func_id(&self) -> FuncId
Gets the FuncId field of the UnitNumber.
sourcepub fn set_func_id(&mut self, func_id: FuncId)
pub fn set_func_id(&mut self, func_id: FuncId)
Sets the FuncId field of the UnitNumber.
sourcepub fn with_func_id(self, func_id: FuncId) -> Self
pub fn with_func_id(self, func_id: FuncId) -> Self
Builder function that sets the FuncId field of the UnitNumber.
sourcepub const fn unit_number(&self) -> u8
pub const fn unit_number(&self) -> u8
Gets the unit number field of the UnitNumber.
sourcepub fn set_unit_number(&mut self, num: u8)
pub fn set_unit_number(&mut self, num: u8)
Sets the unit number field of the UnitNumber.
sourcepub fn with_unit_number(self, num: u8) -> Self
pub fn with_unit_number(self, num: u8) -> Self
Builder function that sets the unit number field of the UnitNumber.
sourcepub const fn from_u8(val: u8) -> Self
pub const fn from_u8(val: u8) -> Self
Infallible function to convert a u8 into a UnitNumber.
sourcepub const fn to_u8(&self) -> u8
pub const fn to_u8(&self) -> u8
Infallible function to convert a UnitNumber into a u8.
sourcepub const fn into_u8(self) -> u8
pub const fn into_u8(self) -> u8
Infallible function to convert a UnitNumber into a u8.
sourcepub const fn len() -> usize
pub const fn len() -> usize
Gets the length of the UnitNumber.
sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Gets whether the UnitNumber is empty.
sourcepub const fn is_valid(&self) -> bool
pub const fn is_valid(&self) -> bool
Gets whether the UnitNumber is valid according to the specification format.
Trait Implementations§
source§impl Clone for UnitNumber
impl Clone for UnitNumber
source§fn clone(&self) -> UnitNumber
fn clone(&self) -> UnitNumber
Returns a copy 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 UnitNumber
impl Debug for UnitNumber
source§impl Default for UnitNumber
impl Default for UnitNumber
source§impl Display for UnitNumber
impl Display for UnitNumber
source§impl From<&UnitNumber> for u8
impl From<&UnitNumber> for u8
source§fn from(val: &UnitNumber) -> Self
fn from(val: &UnitNumber) -> Self
Converts to this type from the input type.
source§impl From<UnitNumber> for u8
impl From<UnitNumber> for u8
source§fn from(val: UnitNumber) -> Self
fn from(val: UnitNumber) -> Self
Converts to this type from the input type.
source§impl PartialEq for UnitNumber
impl PartialEq for UnitNumber
source§fn eq(&self, other: &UnitNumber) -> bool
fn eq(&self, other: &UnitNumber) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<u8> for UnitNumber
impl TryFrom<u8> for UnitNumber
impl Copy for UnitNumber
impl Eq for UnitNumber
impl StructuralPartialEq for UnitNumber
Auto Trait Implementations§
impl Freeze for UnitNumber
impl RefUnwindSafe for UnitNumber
impl Send for UnitNumber
impl Sync for UnitNumber
impl Unpin for UnitNumber
impl UnwindSafe for UnitNumber
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