pub enum Channel {
Card,
Bank,
Ussd,
Qr,
MobileMoney,
BankTransfer,
ApplePay,
}
Expand description
Represents the payment channels supported by Paystack.
The Channel
enum defines the possible payment channels that can be used with Paystack,
including debit card, bank interface, USSD code, QR code, mobile money, bank transfer,
and Apple Pay.
Variants
Card
: Payment with a debit card.Bank
: Payment with a bank interface.Ussd
: Payment with a USSD code.Qr
: Payment with a QR code.MobileMoney
: Payment with mobile money.BankTransfer
: Payment with a bank transfer.ApplePay
: Payment with Apple Pay.
Examples
use paystack::Channel;
let card_channel = Channel::Card;
let bank_channel = Channel::Bank;
let ussd_channel = Channel::Ussd;
let qr_channel = Channel::Qr;
let mobile_money_channel = Channel::MobileMoney;
let bank_transfer_channel = Channel::BankTransfer;
let apple_pay_channel = Channel::ApplePay;
println!("{:?}", card_channel); // Prints: card
println!("{:?}", mobile_money_channel); // Prints: mobile_money
The example demonstrates the usage of the Channel
enum from the Paystack crate,
creating instances of each variant and printing their debug representation.
Variants§
Card
Debit Card
Bank
Payment with Bank Interface
Ussd
Payment with USSD Code
Qr
Payment with QR Code
MobileMoney
Payment with Mobile Money
BankTransfer
Payment with Bank Transfer
ApplePay
Payment with Apple Pay
Trait Implementations§
source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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