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: StringPayload 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: MerchantAccountInfoMerchant account information containing PIX key
merchant_category_code: StringMerchant category code (MCC)
transaction_currency: StringTransaction currency code (“986” for BRL)
transaction_amount: Option<String>Transaction amount (optional for static QR codes)
country_code: StringCountry code (“BR” for Brazil)
merchant_name: StringMerchant name (max 25 characters)
merchant_city: StringMerchant city (max 15 characters)
additional_data: Option<AdditionalData>Additional data field template
crc16: StringCRC16 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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)