pub struct ContextIndex { /* private fields */ }Expand description
Generates an index of installed package context in .agents/context/index.md.
Implementations§
Source§impl ContextIndex
impl ContextIndex
pub fn new(root: impl Into<PathBuf>) -> Self
Sourcepub fn with_packages(self, packages: &[ContextPackage]) -> Self
pub fn with_packages(self, packages: &[ContextPackage]) -> Self
Add Cargo package descriptions to the generated context index.
pub fn context_path(&self) -> &Path
Sourcepub fn generate_index(&self) -> Result<String>
pub fn generate_index(&self) -> Result<String>
Render a Markdown index from context files already installed in the project.
Sourcepub fn update_index(&self) -> Result<()>
pub fn update_index(&self) -> Result<()>
Write the generated index without creating or modifying the project’s agents.md.
Trait Implementations§
Source§impl Clone for ContextIndex
impl Clone for ContextIndex
Auto Trait Implementations§
impl Freeze for ContextIndex
impl RefUnwindSafe for ContextIndex
impl Send for ContextIndex
impl Sync for ContextIndex
impl Unpin for ContextIndex
impl UnsafeUnpin for ContextIndex
impl UnwindSafe for ContextIndex
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