pub struct RenderOptionsBuilder { /* private fields */ }Expand description
Builder for RenderOptions.
Implementations§
Source§impl RenderOptionsBuilder
impl RenderOptionsBuilder
Sourcepub fn module_width(self, width: Length) -> Self
pub fn module_width(self, width: Length) -> Self
Set the X-dimension (width of one module).
Sourcepub fn height(self, height: Length) -> Self
pub fn height(self, height: Length) -> Self
Set the bar height. Ignored by matrix symbologies, which derive height from their module grid.
Sourcepub fn quiet_zone(self, quiet_zone: QuietZone) -> Self
pub fn quiet_zone(self, quiet_zone: QuietZone) -> Self
Set the quiet zone.
Sourcepub fn colors(self, foreground: Color, background: Color) -> Self
pub fn colors(self, foreground: Color, background: Color) -> Self
Set foreground and background colours.
Sourcepub fn human_readable(self, enabled: bool) -> Self
pub fn human_readable(self, enabled: bool) -> Self
Enable or disable the human-readable text line.
Sourcepub fn build(self) -> Result<RenderOptions>
pub fn build(self) -> Result<RenderOptions>
Validate and build.
§Errors
Returns Error::InvalidRenderOptions for a non-positive DPI, module
width, or height.
Trait Implementations§
Source§impl Clone for RenderOptionsBuilder
impl Clone for RenderOptionsBuilder
Source§fn clone(&self) -> RenderOptionsBuilder
fn clone(&self) -> RenderOptionsBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RenderOptionsBuilder
impl Debug for RenderOptionsBuilder
Source§impl Default for RenderOptionsBuilder
impl Default for RenderOptionsBuilder
Source§fn default() -> RenderOptionsBuilder
fn default() -> RenderOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderOptionsBuilder
impl RefUnwindSafe for RenderOptionsBuilder
impl Send for RenderOptionsBuilder
impl Sync for RenderOptionsBuilder
impl Unpin for RenderOptionsBuilder
impl UnsafeUnpin for RenderOptionsBuilder
impl UnwindSafe for RenderOptionsBuilder
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