pub struct QrCodePlugins<'a> { /* private fields */ }Expand description
Borrowed plugin view for a QR code.
This is a convenience wrapper around QrCode::render_with for code that
wants to bind a symbol and registry once, then render through one or more
named plugin renderers.
Implementations§
Source§impl QrCodePlugins<'_>
impl QrCodePlugins<'_>
Sourcepub fn registry(&self) -> &PluginRegistry
pub fn registry(&self) -> &PluginRegistry
Returns the plugin registry bound to this plugin view.
Sourcepub fn render(
&self,
renderer_name: &str,
config: &RenderConfig,
) -> Result<RenderOutput, PluginError>
pub fn render( &self, renderer_name: &str, config: &RenderConfig, ) -> Result<RenderOutput, PluginError>
Renders the bound QR code through a named plugin renderer.
§Errors
Returns PluginError::RendererNotFound when no renderer is registered
with renderer_name, or another PluginError from grid construction,
postprocessing, or rendering.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for QrCodePlugins<'a>
impl<'a> !Send for QrCodePlugins<'a>
impl<'a> !Sync for QrCodePlugins<'a>
impl<'a> !UnwindSafe for QrCodePlugins<'a>
impl<'a> Freeze for QrCodePlugins<'a>
impl<'a> Unpin for QrCodePlugins<'a>
impl<'a> UnsafeUnpin for QrCodePlugins<'a>
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