Skip to main content

ExceptionStatus

Struct ExceptionStatus 

Source
pub struct ExceptionStatus(pub u8);
Expand description

ExceptionStatus contains additional information on exceptional statuses as well as the reporting of the note value. (Non-extended mode only.)

ExceptionStatus is a bitfield, representing the following:

Tuple Fields§

§0: u8

Implementations§

Source§

impl ExceptionStatus

Source

pub fn power_up(&self) -> bool

Unset (0): The device is operating normally (Power up process is complete) Set (1): The device has been powered up. It is performing its initialization routine, and not yet ready to accept documents.

Source

pub fn invalid_command(&self) -> bool

The device received an invalid command.

Source

pub fn failure(&self) -> bool

The device has encountered a problem and is out of service. Intervention is required.

Source

pub fn note_value(&self) -> u8

The non-extended note value field. This field is valid when the device is in non- extended mode and either the escrow or stacked bits are set. (See Omnibus Reply – Data Byte 0 for details of those events)

000 - Unknown/No credit 001 - Denom1 010 - Denom2 011 - Denom3 100 - Denom4 101 - Denom5 110 - Denom6 111 - Denom7

Source

pub fn transport_open(&self) -> bool

Unset (0) - Note path access is closed Set (1) - Note path access is opened (vault, door, or both).

WARNING: This bit will also be reported one time upon power up if the note path was opened while the unit was powered down.

Source

pub fn set_power_up(&mut self, value: bool)

Unset (0): The device is operating normally (Power up process is complete) Set (1): The device has been powered up. It is performing its initialization routine, and not yet ready to accept documents.

Source

pub fn set_invalid_command(&mut self, value: bool)

The device received an invalid command.

Source

pub fn set_failure(&mut self, value: bool)

The device has encountered a problem and is out of service. Intervention is required.

Source

pub fn set_note_value(&mut self, value: u8)

The non-extended note value field. This field is valid when the device is in non- extended mode and either the escrow or stacked bits are set. (See Omnibus Reply – Data Byte 0 for details of those events)

000 - Unknown/No credit 001 - Denom1 010 - Denom2 011 - Denom3 100 - Denom4 101 - Denom5 110 - Denom6 111 - Denom7

Source

pub fn set_transport_open(&mut self, value: bool)

Unset (0) - Note path access is closed Set (1) - Note path access is opened (vault, door, or both).

WARNING: This bit will also be reported one time upon power up if the note path was opened while the unit was powered down.

Source§

impl ExceptionStatus

Source

pub const fn none() -> Self

Create an ExceptionStatus with no bits set.

Trait Implementations§

Source§

impl<T> BitRange<T> for ExceptionStatus
where u8: BitRange<T>,

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> T

Get a range of bits.
Source§

impl<T> BitRangeMut<T> for ExceptionStatus
where u8: BitRangeMut<T>,

Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)

Set a range of bits.
Source§

impl Clone for ExceptionStatus

Source§

fn clone(&self) -> ExceptionStatus

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ExceptionStatus

Source§

impl Debug for ExceptionStatus

Source§

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

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

impl Display for ExceptionStatus

Source§

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

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

impl From<&ExceptionStatus> for u8

Source§

fn from(e: &ExceptionStatus) -> Self

Converts to this type from the input type.
Source§

impl From<ExceptionStatus> for u8

Source§

fn from(e: ExceptionStatus) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for ExceptionStatus

Source§

fn from(b: u8) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExceptionStatus

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for ExceptionStatus

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> Bit for T
where T: BitRange<u8>,

Source§

fn bit(&self, bit: usize) -> bool

Get a single bit.
Source§

impl<T> BitMut for T
where T: BitRangeMut<u8>,

Source§

fn set_bit(&mut self, bit: usize, value: bool)

Set a single bit.
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.