pub struct PluginIdentity { /* private fields */ }Expand description
The calling plugin’s namespace and what it declared it needs.
Built by the host from the mounted plugin’s validated descriptor; a plugin cannot fabricate one for itself.
Implementations§
Source§impl PluginIdentity
impl PluginIdentity
Sourcepub fn new(
id: impl Into<String>,
capabilities: PluginCapabilities,
) -> PluginResult<Self>
pub fn new( id: impl Into<String>, capabilities: PluginCapabilities, ) -> PluginResult<Self>
Bind a validated plugin namespace to its declared capabilities.
Returns an error if the namespace or any declared capability is invalid, so a malformed declaration stops the plugin from mounting rather than failing later at the first call.
Sourcepub fn capabilities(&self) -> &PluginCapabilities
pub fn capabilities(&self) -> &PluginCapabilities
What the plugin declared it needs.
Trait Implementations§
Source§impl Clone for PluginIdentity
impl Clone for PluginIdentity
Source§fn clone(&self) -> PluginIdentity
fn clone(&self) -> PluginIdentity
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 moreAuto Trait Implementations§
impl Freeze for PluginIdentity
impl RefUnwindSafe for PluginIdentity
impl Send for PluginIdentity
impl Sync for PluginIdentity
impl Unpin for PluginIdentity
impl UnsafeUnpin for PluginIdentity
impl UnwindSafe for PluginIdentity
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