pub struct FilesystemStorage { /* private fields */ }Expand description
Filesystem storage backend for skills
Implementations§
Source§impl FilesystemStorage
impl FilesystemStorage
Sourcepub async fn new(base_path: PathBuf) -> Result<Self, ServiceError>
pub async fn new(base_path: PathBuf) -> Result<Self, ServiceError>
Create a new filesystem storage backend
Sourcepub async fn load_skill_metadata(
&self,
skill_id: &str,
) -> Result<Option<SkillMetadata>, ServiceError>
pub async fn load_skill_metadata( &self, skill_id: &str, ) -> Result<Option<SkillMetadata>, ServiceError>
Load skill metadata from disk or cache
Sourcepub async fn save_skill_metadata(
&self,
skill_id: &str,
metadata: &SkillMetadata,
) -> Result<(), ServiceError>
pub async fn save_skill_metadata( &self, skill_id: &str, metadata: &SkillMetadata, ) -> Result<(), ServiceError>
Save skill metadata to disk and cache
Sourcepub async fn load_skill_content(
&self,
skill_id: &str,
) -> Result<Option<String>, ServiceError>
pub async fn load_skill_content( &self, skill_id: &str, ) -> Result<Option<String>, ServiceError>
Load skill content (SKILL.md)
Sourcepub async fn save_skill_content(
&self,
skill_id: &str,
content: &str,
) -> Result<(), ServiceError>
pub async fn save_skill_content( &self, skill_id: &str, content: &str, ) -> Result<(), ServiceError>
Save skill content (SKILL.md)
Sourcepub async fn list_skill_ids(&self) -> Result<Vec<String>, ServiceError>
pub async fn list_skill_ids(&self) -> Result<Vec<String>, ServiceError>
List all skill IDs in storage
Sourcepub async fn delete_skill(&self, skill_id: &str) -> Result<(), ServiceError>
pub async fn delete_skill(&self, skill_id: &str) -> Result<(), ServiceError>
Delete a skill from storage
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clear metadata cache
Sourcepub async fn get_storage_stats(&self) -> Result<StorageStats, ServiceError>
pub async fn get_storage_stats(&self) -> Result<StorageStats, ServiceError>
Get storage statistics
Trait Implementations§
Source§impl StorageBackend for FilesystemStorage
impl StorageBackend for FilesystemStorage
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for FilesystemStorage
impl !RefUnwindSafe for FilesystemStorage
impl Send for FilesystemStorage
impl Sync for FilesystemStorage
impl Unpin for FilesystemStorage
impl UnsafeUnpin for FilesystemStorage
impl !UnwindSafe for FilesystemStorage
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> 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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.