#[non_exhaustive]pub enum EventType {
Invoice,
Transaction,
}
Expand description
Represents the different terminal event types supported by the Paystack API.
The EventType
enum defines the possible even types that can be sent to Paystack Terminal.
The paystack API currently supports Invoice
and Transaction
. This list will be periodically updated as the API evolves. Feel free to open a PR if you catch the change before us.
Variants
Invoice
: Invoice event.Transaction
: Transaction event.
Examples
use paystack::EventType;
let invoice_event = EventType::Invoice;
let terminal_event = EventType::Transaction;
println!("{:?}", invoice_event); // Prints: invoice
The example demonstrates the usage of the EventType
enum from the Paystack crate, creating instances of each variant and printing a debug representation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
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