pub struct BrCode {Show 17 fields
pub payload_version: u8,
pub initiation_method: Option<u8>,
pub merchant_account_information: Option<String>,
pub merchant_information: Vec<MerchantInfo>,
pub merchant_category_code: u32,
pub merchant_name: String,
pub merchant_city: String,
pub convenience: Option<String>,
pub convenience_fee_fixed: Option<String>,
pub convenience_fee_percentage: Option<String>,
pub postal_code: Option<String>,
pub currency: String,
pub amount: Option<f64>,
pub country_code: String,
pub field_template: Vec<Label>,
pub crc1610: String,
pub templates: Option<Vec<Template>>,
}Fields§
§payload_version: u8§initiation_method: Option<u8>§merchant_account_information: Option<String>§merchant_information: Vec<MerchantInfo>§merchant_category_code: u32§merchant_name: String§merchant_city: String§convenience: Option<String>§convenience_fee_fixed: Option<String>§convenience_fee_percentage: Option<String>§postal_code: Option<String>§currency: String§amount: Option<f64>§country_code: String§field_template: Vec<Label>§crc1610: String§templates: Option<Vec<Template>>Implementations§
Source§impl BrCode
impl BrCode
pub fn is_pix(&self) -> bool
pub fn get_transaction_id(&self) -> Option<String>
pub fn get_alias(&self) -> Option<Vec<String>>
pub fn get_message(&self) -> Option<Vec<String>>
pub fn encode(self) -> String
pub fn to_json(&self) -> String
pub fn to_crc16_json(self) -> String
pub fn to_svg_string(&self, ecc: QrCodeEcc, size: usize) -> String
pub fn to_svg_standard_string(&self) -> String
pub fn to_vec_u8(&self, ecc: QrCodeEcc, size: usize) -> Vec<u8> ⓘ
pub fn to_svg_file(&self, file_path: &str, ecc: QrCodeEcc, size: usize)
pub fn to_standard_svg_file(&self, file_path: &str)
pub fn to_png_file(&self, file_path: &str, ecc: QrCodeEcc, size: usize)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BrCode
impl<'de> Deserialize<'de> for BrCode
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
Source§impl Deserialize for BrCode
impl Deserialize for BrCode
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