Standardized status for a transaction, independent of the source document.
Variants
Methods
Create a new TransactionStatus from a code string
Example
let status = new;
assert!;
fn booked() -> TransactionStatus
Create a new TransactionStatus::Booked
Example
let status = booked;
assert_eq!;
fn pending() -> TransactionStatus
Create a new TransactionStatus::Pending
Example
let status = pending;
assert_eq!;
fn cancelled() -> TransactionStatus
Create a new TransactionStatus::Cancelled
Example
let status = cancelled;
assert_eq!;
fn rejected() -> TransactionStatus
Create a new TransactionStatus::Rejected
Example
let status = rejected;
assert_eq!;
Create a new TransactionStatus::Unknown with a custom value
Example
let status = unknown;
assert_eq!;
Get the string representation of the status
Example
let status = booked;
assert_eq!;
Check if the status is Pending
Example
let status = pending;
assert!;
Check if the status is Cancelled
Example
let status = cancelled;
assert!;
Check if the status is Rejected
Example
let status = rejected;
assert!;
Check if the status is Unknown
Example
let status = unknown;
assert!;
Clone the TransactionStatus
Example
let status = booked;
let cloned = status.clone;
assert_eq!;
Protocols
protocol is_variant
Test if the provided argument is a variant.