pub struct PluginInfo {
pub name: String,
pub version: String,
pub description: String,
pub author: String,
pub homepage: Option<String>,
pub api_version: String,
pub min_scarab_version: String,
pub enabled: bool,
pub failure_count: u32,
pub emoji: Option<String>,
pub color: Option<String>,
pub catchphrase: Option<String>,
}Expand description
Information about a loaded plugin with personality
Fields§
§name: StringPlugin name
version: StringPlugin version
description: StringPlugin description
Plugin author
homepage: Option<String>Plugin homepage URL
api_version: StringAPI version required
min_scarab_version: StringMinimum Scarab version
enabled: boolWhether plugin is currently enabled
failure_count: u32Number of failures
emoji: Option<String>Plugin emoji (for display)
color: Option<String>Plugin color (hex code)
catchphrase: Option<String>Plugin catchphrase
Implementations§
Source§impl PluginInfo
impl PluginInfo
Sourcepub fn new(
name: impl Into<String>,
version: impl Into<String>,
description: impl Into<String>,
author: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, version: impl Into<String>, description: impl Into<String>, author: impl Into<String>, ) -> Self
Create new plugin info
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get display name with emoji if available
Sourcepub fn mood(&self) -> PluginMood
pub fn mood(&self) -> PluginMood
Get plugin mood based on failure count
Trait Implementations§
Source§impl Clone for PluginInfo
impl Clone for PluginInfo
Source§fn clone(&self) -> PluginInfo
fn clone(&self) -> PluginInfo
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 Debug for PluginInfo
impl Debug for PluginInfo
Source§impl<'de> Deserialize<'de> for PluginInfo
impl<'de> Deserialize<'de> for PluginInfo
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
Auto Trait Implementations§
impl Freeze for PluginInfo
impl RefUnwindSafe for PluginInfo
impl Send for PluginInfo
impl Sync for PluginInfo
impl Unpin for PluginInfo
impl UnsafeUnpin for PluginInfo
impl UnwindSafe for PluginInfo
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.