Struct PhysicalCashUnit

Source
#[repr(C)]
pub struct PhysicalCashUnit { /* private fields */ }
Expand description

Represents a XFS physical cash unit and its parameters.

Implementations§

Source§

impl PhysicalCashUnit

Source

pub const fn new() -> Self

Creates a new PhysicalCashUnit.

Source

pub const fn name(&self) -> &PcuName

Gets the PcuName.

Name of the physical location in the BNR where this cash unit is installed.

Source

pub fn set_name(&mut self, name: PcuName)

Sets the PcuName.

Source

pub fn with_name(self, name: PcuName) -> Self

Builder function that sets the PcuName.

Source

pub const fn unit_id(&self) -> &UnitId

Gets the UnitId.

Physical cash unit ID. Corresponds to the BNR Module Serial Number (MSN).

Source

pub fn set_unit_id(&mut self, unit_id: UnitId)

Sets the UnitId.

Source

pub fn with_unit_id(self, unit_id: UnitId) -> Self

Builder function that sets the UnitId.

Source

pub const fn count(&self) -> u32

Gets the count.

Actual count of bills in the physical cash unit.

  • Type: One Shot.
  • Max: 65535.
  • Access:
Source

pub fn set_count(&mut self, count: u32)

Sets the count.

Source

pub fn with_count(self, count: u32) -> Self

Builder function that sets the count.

Source

pub const fn threshold(&self) -> Threshold

Gets the Threshold.

Defines limits to determine threshold_status.

Source

pub fn set_threshold(&mut self, threshold: Threshold)

Sets the Threshold.

Source

pub fn with_threshold(self, threshold: Threshold) -> Self

Builder function that sets the Threshold.

Source

pub const fn status(&self) -> u32

Gets the status.

Status of the physical cash unit.

Source

pub fn set_status(&mut self, status: u32)

Sets the status.

Source

pub fn with_status(self, status: u32) -> Self

Builder function that sets the status.

Source

pub const fn threshold_status(&self) -> ThresholdStatus

Gets the ThresholdStatus.

ThresholdStatus of the physical cash unit.

Source

pub fn set_threshold_status(&mut self, status: ThresholdStatus)

Sets the ThresholdStatus.

Source

pub fn with_threshold_status(self, status: ThresholdStatus) -> Self

Builder function that sets the ThresholdStatus.

Source

pub const fn threshold_mode(&self) -> ThresholdMode

Gets the ThresholdMode.

Defines how threshold_status is determined.

Source

pub fn set_threshold_mode(&mut self, mode: ThresholdMode)

Sets the ThresholdMode.

Source

pub fn with_threshold_mode(self, mode: ThresholdMode) -> Self

Builder function that sets the ThresholdMode.

Source

pub const fn lock(&self) -> bool

Gets the lock.

Enables or disables the physical cash unit.

Source

pub fn set_lock(&mut self, lock: bool)

Sets the lock.

Source

pub fn with_lock(self, lock: bool) -> Self

Builder function that sets the lock.

Source§

impl PhysicalCashUnit

Source

pub const fn xfs_name() -> &'static str

Gets the XfsMember name.

Trait Implementations§

Source§

impl Clone for PhysicalCashUnit

Source§

fn clone(&self) -> PhysicalCashUnit

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PhysicalCashUnit

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for PhysicalCashUnit

Source§

fn default() -> PhysicalCashUnit

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PhysicalCashUnit

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for PhysicalCashUnit

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<&PhysicalCashUnit> for XfsMember

Source§

fn from(val: &PhysicalCashUnit) -> Self

Converts to this type from the input type.
Source§

impl From<&PhysicalCashUnit> for XfsStruct

Source§

fn from(val: &PhysicalCashUnit) -> Self

Converts to this type from the input type.
Source§

impl From<&PhysicalCashUnit> for XfsValue

Source§

fn from(val: &PhysicalCashUnit) -> Self

Converts to this type from the input type.
Source§

impl From<PhysicalCashUnit> for XfsMember

Source§

fn from(val: PhysicalCashUnit) -> Self

Converts to this type from the input type.
Source§

impl From<PhysicalCashUnit> for XfsStruct

Source§

fn from(val: PhysicalCashUnit) -> Self

Converts to this type from the input type.
Source§

impl From<PhysicalCashUnit> for XfsValue

Source§

fn from(val: PhysicalCashUnit) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PhysicalCashUnit

Source§

fn eq(&self, other: &PhysicalCashUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PhysicalCashUnit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&XfsMember> for PhysicalCashUnit

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: &XfsMember) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<&XfsStruct> for PhysicalCashUnit

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: &XfsStruct) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<&XfsValue> for PhysicalCashUnit

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: &XfsValue) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<XfsMember> for PhysicalCashUnit

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: XfsMember) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<XfsStruct> for PhysicalCashUnit

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: XfsStruct) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<XfsValue> for PhysicalCashUnit

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(val: XfsValue) -> Result<Self>

Performs the conversion.
Source§

impl Copy for PhysicalCashUnit

Source§

impl StructuralPartialEq for PhysicalCashUnit

Auto Trait Implementations§

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

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