display_qr_code_from_string

Function display_qr_code_from_string 

Source
pub fn display_qr_code_from_string(
    text: &str,
    options: &QrOptions,
) -> QrResult<()>
Expand description

Display a QR code to stdout from a plain string

This function generates a QR code from a plain string (like URLs) without serialization. Use this for simple text data like URLs, connection strings, etc.

§Arguments

  • text - The plain text to encode in the QR code
  • options - Display options for the QR code

§Returns

  • QrResult<()> - Success or error

§Examples

use zoe_app_primitives::qr::{display_qr_code_from_string, QrOptions};

let url = "https://signal.org/#eu_EQIlw-O0NmftmVoqUlKZiwlqcTMG0ybgChE8XQtjn2WSHw";
let options = QrOptions::new("📱 SIGNAL LINKING")
    .with_subtitle("Scan with Signal mobile app")
    .with_footer("Link expires in 10 minutes");
display_qr_code_from_string(url, &options).unwrap();