pub fn display_qr_code<T: Serialize>(
data: &T,
options: &QrOptions,
) -> QrResult<()>Expand description
Display a QR code to stdout from structured data
This function generates a QR code from structured data using postcard serialization.
§Arguments
data- The data to encode (must implement Serialize)options- Display options for the QR code
§Returns
QrResult<()>- Success or error
§Examples
use zoe_app_primitives::qr::{display_qr_code, QrOptions};
use serde::Serialize;
#[derive(Serialize)]
struct MyData {
message: String,
}
let data = MyData { message: "Hello, World!".to_string() };
let options = QrOptions::new("My QR Code").with_footer("Scan me!");
display_qr_code(&data, &options).unwrap();