pub struct QrOptions {
pub size: Option<u32>,
pub margin: Option<u32>,
pub ecc: Option<QrEcc>,
pub domain: Option<String>,
pub refresh: Option<QrRefresh>,
}Expand description
QR rendering options. All fields are optional — omit to use server defaults.
Fields§
§size: Option<u32>Module size in pixels. Server clamps to 1–32. Default: 8.
margin: Option<u32>Quiet-zone modules. Server clamps to 0–16. Default: 4.
ecc: Option<QrEcc>Error-correction level.
domain: Option<String>Force the QR to encode a specific verified custom domain.
refresh: Option<QrRefresh>Cache-bust token.
Implementations§
Source§impl QrOptions
impl QrOptions
Sourcepub fn with_margin(self, margin: u32) -> Self
pub fn with_margin(self, margin: u32) -> Self
Builder — set margin.
Sourcepub fn with_domain(self, domain: impl Into<String>) -> Self
pub fn with_domain(self, domain: impl Into<String>) -> Self
Builder — set domain.
Sourcepub fn with_refresh(self, refresh: QrRefresh) -> Self
pub fn with_refresh(self, refresh: QrRefresh) -> Self
Builder — set refresh.
Sourcepub fn to_query_pairs(&self) -> Vec<(&'static str, String)>
pub fn to_query_pairs(&self) -> Vec<(&'static str, String)>
Render this options bag into (name, value) pairs for a query string.
Trait Implementations§
impl Eq for QrOptions
impl StructuralPartialEq for QrOptions
Auto Trait Implementations§
impl Freeze for QrOptions
impl RefUnwindSafe for QrOptions
impl Send for QrOptions
impl Sync for QrOptions
impl Unpin for QrOptions
impl UnsafeUnpin for QrOptions
impl UnwindSafe for QrOptions
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