pub struct Plugin {
pub manifest: Manifest,
pub dir: PathBuf,
pub builtin: bool,
pub skills: Vec<Skill>,
pub agents: Vec<AgentDef>,
pub commands: Vec<Command>,
pub problems: Vec<String>,
pub embedded: Option<Arc<BTreeMap<String, String>>>,
}Expand description
A loaded plugin.
Fields§
§manifest: Manifest§dir: PathBuf§builtin: boolShips with the app (may use native tools).
skills: Vec<Skill>§agents: Vec<AgentDef>Subagent definitions from its agents/*.md (Claude Code format).
commands: Vec<Command>Slash commands from its commands/*.md (Claude Code format).
problems: Vec<String>Non-fatal problems for the plugin’s card (a bad skill, a missing script). The parts that work are still used.
embedded: Option<Arc<BTreeMap<String, String>>>Its files when they are in the binary (a bundled plugin), by path; None: on disk
in dir.
Implementations§
Source§impl Plugin
impl Plugin
pub fn id(&self) -> &str
Sourcepub fn read(&self, rel: &str) -> Result<String, String>
pub fn read(&self, rel: &str) -> Result<String, String>
The text of its file rel (a path inside the plugin, checked): from the binary for
a bundled plugin, else from its folder; capped at MAX_PLUGIN_FILE_BYTES.
Sourcepub fn supported_here(&self) -> bool
pub fn supported_here(&self) -> bool
The manifest’s platforms include this system (or it has none).
Sourcepub fn native_tools(&self) -> Vec<&str>
pub fn native_tools(&self) -> Vec<&str>
Names of the app’s own (in-tree) tools this plugin turns on.
Trait Implementations§
impl StructuralPartialEq for Plugin
Auto Trait Implementations§
impl Forget for Plugin
impl Freeze for Pluginwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Starter>: Freeze,
PhantomData<ManifestTool>: Freeze,
*const LeafNode<String, McpServerConfig> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, McpServerConfig)>>: Freeze,
PhantomData<Setting>: Freeze,
PhantomData<String>: Freeze,
PhantomData<ManifestView>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<ManifestArtifactType>: Freeze,
PhantomData<ManifestRenderer>: Freeze,
PhantomData<ManifestHook>: Freeze,
PhantomData<ManifestEnv>: Freeze,
PhantomData<ManifestChannel>: Freeze,
PhantomData<Skill>: Freeze,
PhantomData<AgentDef>: Freeze,
PhantomData<Command>: Freeze,
*const ArcInner<BTreeMap<String, String>> is !null: Freeze,
PhantomData<ArcInner<BTreeMap<String, String>>>: Freeze,
impl Move for Plugin
impl RefUnwindSafe for Plugin
impl Send for Pluginwhere
RawVecInner: Send,
NodeRef<Owned, String, Value, LeafOrInternal>: Send,
BoxRaw<(String, Value)>: Send,
NodeRef<Owned, String, McpServerConfig, LeafOrInternal>: Send,
BoxRaw<(String, McpServerConfig)>: Send,
NodeRef<Owned, String, String, LeafOrInternal>: Send,
BoxRaw<(String, String)>: Send,
Arc<BTreeMap<String, String>>: Send,
impl Sync for Pluginwhere
RawVecInner: Sync,
NodeRef<Owned, String, Value, LeafOrInternal>: Sync,
BoxRaw<(String, Value)>: Sync,
NodeRef<Owned, String, McpServerConfig, LeafOrInternal>: Sync,
BoxRaw<(String, McpServerConfig)>: Sync,
NodeRef<Owned, String, String, LeafOrInternal>: Sync,
BoxRaw<(String, String)>: Sync,
Arc<BTreeMap<String, String>>: Sync,
impl Unpin for Pluginwhere
*const u8 is !null: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
*const LeafNode<String, McpServerConfig> is !null: Unpin,
Box<(String, McpServerConfig)>: Unpin,
*const LeafNode<String, String> is !null: Unpin,
Box<(String, String)>: Unpin,
Arc<BTreeMap<String, String>>: Unpin,
impl UnsafeUnpin for Pluginwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Starter>: UnsafeUnpin,
PhantomData<ManifestTool>: UnsafeUnpin,
*const LeafNode<String, McpServerConfig> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, McpServerConfig)>>: UnsafeUnpin,
PhantomData<Setting>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<ManifestView>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<ManifestArtifactType>: UnsafeUnpin,
PhantomData<ManifestRenderer>: UnsafeUnpin,
PhantomData<ManifestHook>: UnsafeUnpin,
PhantomData<ManifestEnv>: UnsafeUnpin,
PhantomData<ManifestChannel>: UnsafeUnpin,
PhantomData<Skill>: UnsafeUnpin,
PhantomData<AgentDef>: UnsafeUnpin,
PhantomData<Command>: UnsafeUnpin,
*const ArcInner<BTreeMap<String, String>> is !null: UnsafeUnpin,
PhantomData<ArcInner<BTreeMap<String, String>>>: UnsafeUnpin,
impl UnwindSafe for Pluginwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, McpServerConfig>: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
Arc<BTreeMap<String, String>>: UnwindSafe,
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