#[non_exhaustive]pub enum EncodeError {
DataTooLong {
required_bits: Option<usize>,
capacity_bits: usize,
},
InvalidData {
mode: &'static str,
byte_offset: usize,
},
TextNotRepresentable {
byte_offset: usize,
family: &'static str,
},
InvalidEciAssignment(u32),
InvalidApplicationIndicator,
InvalidVersionRange,
UnsupportedMode {
mode: &'static str,
family: &'static str,
},
UnsupportedErrorCorrection {
version: SymbolVersion,
error_correction: SymbolErrorCorrection,
},
InvalidMask,
InvalidStructuredAppendPartCount {
count: usize,
},
}Expand description
Errors returned while encoding a QR Code symbol.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DataTooLong
The encoded bit stream exceeds the selected symbol capacity.
Fields
InvalidData
The input contains a byte that is not valid for the requested mode.
Fields
TextNotRepresentable
micro-qr only.The input cannot be represented by the selected symbol family.
Fields
InvalidEciAssignment(u32)
qr or rmqr only.The ECI assignment is outside the range supported by QR Code.
InvalidApplicationIndicator
qr or rmqr only.The FNC1 second-position application indicator is invalid.
InvalidVersionRange
The selected version range is empty or invalid.
UnsupportedMode
micro-qr only.The selected symbol family does not support a requested mode.
Fields
UnsupportedErrorCorrection
micro-qr only.The selected version does not support the requested error correction level.
Fields
version: SymbolVersionThe selected version.
error_correction: SymbolErrorCorrectionThe requested error correction level.
InvalidMask
The requested mask number is outside the supported range.
InvalidStructuredAppendPartCount
qr only.A Structured Append sequence has fewer than one or more than 16 parts.
Trait Implementations§
Source§impl Debug for EncodeError
impl Debug for EncodeError
Source§impl Display for EncodeError
impl Display for EncodeError
Source§impl Error for EncodeError
impl Error for EncodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()