Enum paystack::BearerType
source · pub enum BearerType {
Subaccount,
Account,
AllProportional,
All,
}
Expand description
Represents the type of bearer for a charge.
The BearerType
enum defines the possible types of bearers for a charge, indicating who
is responsible for the transaction split.
Variants
Subaccount
: The subaccount bears the transaction split.Account
: The main account bears the transaction split.AllProportional
: The transaction is split proportionally to all accounts.All
: The transaction is paid by all accounts.
Examples
use paystack::BearerType;
let subaccount_bearer = BearerType::Subaccount;
let account_bearer = BearerType::Account;
let all_proportional_bearer = BearerType::AllProportional;
let all_bearer = BearerType::All;
println!("{:?}", subaccount_bearer); // Prints: Subaccount
The example demonstrates the usage of the BearerType
enum, creating instances of each variant
and printing their debug representation.
Variants§
Subaccount
The subaccount bears the transaction split
Account
The main account bears the transaction split
AllProportional
The transaction is split proportionally to all accounts
All
The transaction is paid by all accounts
Trait Implementations§
source§impl Clone for BearerType
impl Clone for BearerType
source§fn clone(&self) -> BearerType
fn clone(&self) -> BearerType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BearerType
impl Debug for BearerType
source§impl Default for BearerType
impl Default for BearerType
source§fn default() -> BearerType
fn default() -> BearerType
Returns the “default value” for a type. Read more
source§impl Display for BearerType
impl Display for BearerType
Auto Trait Implementations§
impl RefUnwindSafe for BearerType
impl Send for BearerType
impl Sync for BearerType
impl Unpin for BearerType
impl UnwindSafe for BearerType
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