pub struct BRCode {
pub payload_format_indicator: String,
pub point_of_initiation_method: Option<String>,
pub merchant_account_info: MerchantAccountInfo,
pub merchant_category_code: String,
pub transaction_currency: String,
pub transaction_amount: Option<String>,
pub country_code: String,
pub merchant_name: String,
pub merchant_city: String,
pub additional_data: Option<AdditionalData>,
pub crc16: String,
}
Expand description
Main BR Code structure representing a PIX QR code
Fields§
§payload_format_indicator: String
Payload format indicator (always “01” for EMV QRCPS)
point_of_initiation_method: Option<String>
Point of initiation method (“11” for static, “12” for dynamic)
merchant_account_info: MerchantAccountInfo
Merchant account information containing PIX key
merchant_category_code: String
Merchant category code (MCC)
transaction_currency: String
Transaction currency code (“986” for BRL)
transaction_amount: Option<String>
Transaction amount (optional for static QR codes)
country_code: String
Country code (“BR” for Brazil)
merchant_name: String
Merchant name (max 25 characters)
merchant_city: String
Merchant city (max 15 characters)
additional_data: Option<AdditionalData>
Additional data field template
crc16: String
CRC16 checksum for validation
Implementations§
Source§impl BRCode
impl BRCode
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Check if this is a dynamic QR code
Sourcepub fn pix_key_type(&self) -> PixKeyType
pub fn pix_key_type(&self) -> PixKeyType
Get the PIX key type
Sourcepub fn has_amount(&self) -> bool
pub fn has_amount(&self) -> bool
Check if amount is specified
Trait Implementations§
impl StructuralPartialEq for BRCode
Auto Trait Implementations§
impl Freeze for BRCode
impl RefUnwindSafe for BRCode
impl Send for BRCode
impl Sync for BRCode
impl Unpin for BRCode
impl UnwindSafe for BRCode
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