pub struct PluginStatusRec<'a> {
pub name: Cow<'a, str>,
pub id: Cow<'a, str>,
pub version: Option<Cow<'a, str>>,
pub long_version: Option<Cow<'a, str>>,
pub path: Cow<'a, str>,
pub state: PluginState,
pub report: PluginReport,
}
Expand description
The structure which contains all information about the plugin status in a single cloneable structure
Fields§
§name: Cow<'a, str>
§id: Cow<'a, str>
§version: Option<Cow<'a, str>>
§long_version: Option<Cow<'a, str>>
§path: Cow<'a, str>
§state: PluginState
§report: PluginReport
Implementations§
Source§impl<'a> PluginStatusRec<'a>
impl<'a> PluginStatusRec<'a>
Sourcepub fn new<T: PluginStatus + ?Sized>(plugin: &'a T) -> Self
pub fn new<T: PluginStatus + ?Sized>(plugin: &'a T) -> Self
Construct the status structure from the getter interface
Sourcepub fn into_owned(self) -> PluginStatusRec<'static>
pub fn into_owned(self) -> PluginStatusRec<'static>
Convert the status structure to the owned version
Trait Implementations§
Source§impl<'a> Clone for PluginStatusRec<'a>
impl<'a> Clone for PluginStatusRec<'a>
Source§fn clone(&self) -> PluginStatusRec<'a>
fn clone(&self) -> PluginStatusRec<'a>
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<'a> Debug for PluginStatusRec<'a>
impl<'a> Debug for PluginStatusRec<'a>
Source§impl<'de, 'a> Deserialize<'de> for PluginStatusRec<'a>
impl<'de, 'a> Deserialize<'de> for PluginStatusRec<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> PartialEq for PluginStatusRec<'a>
impl<'a> PartialEq for PluginStatusRec<'a>
Source§impl PluginStatus for PluginStatusRec<'_>
impl PluginStatus for PluginStatusRec<'_>
Source§fn version(&self) -> Option<&str>
fn version(&self) -> Option<&str>
Returns the version of the loaded plugin (usually the version of the plugin’s crate)
Source§fn long_version(&self) -> Option<&str>
fn long_version(&self) -> Option<&str>
Returns the long version of the loaded plugin (usually the version of the plugin’s crate + git commit hash)
Source§fn state(&self) -> PluginState
fn state(&self) -> PluginState
Returns the plugin’s state (Declared, Loaded, Started)
Source§fn report(&self) -> PluginReport
fn report(&self) -> PluginReport
Returns the plugin’s current report: a list of messages and the severity level
When the status is changed, the report is cleared
Source§impl<'a> Serialize for PluginStatusRec<'a>
impl<'a> Serialize for PluginStatusRec<'a>
impl<'a> Eq for PluginStatusRec<'a>
impl<'a> StructuralPartialEq for PluginStatusRec<'a>
Auto Trait Implementations§
impl<'a> Freeze for PluginStatusRec<'a>
impl<'a> RefUnwindSafe for PluginStatusRec<'a>
impl<'a> Send for PluginStatusRec<'a>
impl<'a> Sync for PluginStatusRec<'a>
impl<'a> Unpin for PluginStatusRec<'a>
impl<'a> UnwindSafe for PluginStatusRec<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.