pub struct QRBorderOptions {
pub border: BorderOptions,
pub round: f64,
pub border_inner: Option<BorderOptions>,
pub border_outer: Option<BorderOptions>,
pub decorations: HashMap<Position, BorderDecoration>,
}Expand description
Extension options for the QR Border Plugin.
Fields§
§border: BorderOptionsMain border options
round: f64Corner roundness (0.0 = square, 1.0 = fully round)
border_inner: Option<BorderOptions>Optional inner border
border_outer: Option<BorderOptions>Optional outer border
decorations: HashMap<Position, BorderDecoration>Decorations mapped by position
Implementations§
Source§impl QRBorderOptions
impl QRBorderOptions
Sourcepub fn new(thickness: f64, color: impl Into<String>) -> Self
pub fn new(thickness: f64, color: impl Into<String>) -> Self
Create new border options with specified thickness and color.
Sourcepub fn with_round(self, round: f64) -> Self
pub fn with_round(self, round: f64) -> Self
Set corner roundness.
Sourcepub fn with_inner_border(self, options: BorderOptions) -> Self
pub fn with_inner_border(self, options: BorderOptions) -> Self
Set inner border.
Sourcepub fn with_outer_border(self, options: BorderOptions) -> Self
pub fn with_outer_border(self, options: BorderOptions) -> Self
Set outer border.
Sourcepub fn with_decoration(
self,
position: Position,
decoration: BorderDecoration,
) -> Self
pub fn with_decoration( self, position: Position, decoration: BorderDecoration, ) -> Self
Add a decoration at the specified position.
Trait Implementations§
Source§impl Clone for QRBorderOptions
impl Clone for QRBorderOptions
Source§fn clone(&self) -> QRBorderOptions
fn clone(&self) -> QRBorderOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QRBorderOptions
impl Debug for QRBorderOptions
Source§impl Default for QRBorderOptions
impl Default for QRBorderOptions
Source§impl PartialEq for QRBorderOptions
impl PartialEq for QRBorderOptions
impl StructuralPartialEq for QRBorderOptions
Auto Trait Implementations§
impl Freeze for QRBorderOptions
impl RefUnwindSafe for QRBorderOptions
impl Send for QRBorderOptions
impl Sync for QRBorderOptions
impl Unpin for QRBorderOptions
impl UnsafeUnpin for QRBorderOptions
impl UnwindSafe for QRBorderOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.