pub fn generate_qr_string<D: AsRef<[u8]>>(data: D) -> Result<String, QrError>
Expand description

Generate String from the given data as QR code.

Returns an error if generating the QR code failed.

Examples

let qr_string = qr2term::generate_qr_string("https://rust-lang.org/").unwrap();
print!("{}", qr_string);

Panics

Panics if generating the QR code string failed.