pub struct PluginRoot {
pub name: String,
pub root: PathBuf,
pub agents_dir: PathBuf,
pub skills_dir: PathBuf,
}Expand description
One discovered plugin: its resolved name and the directories its agents and skills live under.
Why: the resolved name (manifest name:, falling back to the
directory name) is what every namespaced <plugin>:<local-name> entry
uses — it may differ from the on-disk subdirectory name, so callers must
always go through this struct rather than re-deriving a plugin’s
identity from its path.
What: root is the plugin’s own directory
(<project_root>/.claude/plugins/<dir>); agents_dir/skills_dir are
already-joined, ready-to-scan paths (manifest overrides applied, or the
agents/skills convention when absent) — neither is guaranteed to
exist on disk.
Test: tests::discover_plugin_roots_*.
Fields§
§name: StringResolved plugin name — manifest name:, or the directory name.
root: PathBufThe plugin’s own root directory.
agents_dir: PathBufWhere this plugin’s *.md agents live.
skills_dir: PathBufWhere this plugin’s <skill>/SKILL.md skills live.
Trait Implementations§
Source§impl Clone for PluginRoot
impl Clone for PluginRoot
Source§fn clone(&self) -> PluginRoot
fn clone(&self) -> PluginRoot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PluginRoot
impl RefUnwindSafe for PluginRoot
impl Send for PluginRoot
impl Sync for PluginRoot
impl Unpin for PluginRoot
impl UnsafeUnpin for PluginRoot
impl UnwindSafe for PluginRoot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more