pub struct PluginLoadSpec { /* private fields */ }Expand description
A request to load a plugin through a specific backend format.
Implementations§
Source§impl PluginLoadSpec
impl PluginLoadSpec
Sourcepub fn new(format: PluginFormat, location: impl Into<String>) -> Result<Self>
pub fn new(format: PluginFormat, location: impl Into<String>) -> Result<Self>
Builds a plugin load request, rejecting an empty or whitespace-only location.
§Errors
Returns an error when location is empty after trimming.
Sourcepub fn format(&self) -> PluginFormat
pub fn format(&self) -> PluginFormat
Returns the backend format requested by this load.
Sourcepub fn require_format(&self, expected: PluginFormat) -> Result<()>
pub fn require_format(&self, expected: PluginFormat) -> Result<()>
Requires a specific backend format for this load request.
§Errors
Returns a type mismatch when the requested format does not match
expected.
Trait Implementations§
Source§impl Clone for PluginLoadSpec
impl Clone for PluginLoadSpec
Source§fn clone(&self) -> PluginLoadSpec
fn clone(&self) -> PluginLoadSpec
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 PluginLoadSpec
impl Debug for PluginLoadSpec
impl Eq for PluginLoadSpec
Source§impl PartialEq for PluginLoadSpec
impl PartialEq for PluginLoadSpec
Source§fn eq(&self, other: &PluginLoadSpec) -> bool
fn eq(&self, other: &PluginLoadSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PluginLoadSpec
Auto Trait Implementations§
impl Freeze for PluginLoadSpec
impl RefUnwindSafe for PluginLoadSpec
impl Send for PluginLoadSpec
impl Sync for PluginLoadSpec
impl Unpin for PluginLoadSpec
impl UnsafeUnpin for PluginLoadSpec
impl UnwindSafe for PluginLoadSpec
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