pub struct FilePersistenceConfig {
pub root_data_dir: PathBuf,
pub state_dir: PathBuf,
pub logs_dir: PathBuf,
pub prompts_dir: PathBuf,
pub vector_db_dir: PathBuf,
pub enable_compression: bool,
pub enable_encryption: bool,
pub backup_count: usize,
pub auto_save_interval: u64,
pub auto_create_dirs: bool,
pub dir_permissions: Option<u32>,
}Expand description
Configuration for file-based persistence
Fields§
§root_data_dir: PathBufRoot data directory (replaces storage_path)
state_dir: PathBufSubdirectory paths (relative to root_data_dir)
logs_dir: PathBuf§prompts_dir: PathBuf§vector_db_dir: PathBuf§enable_compression: boolExisting configuration options
enable_encryption: bool§backup_count: usize§auto_save_interval: u64§auto_create_dirs: boolNew configuration options
dir_permissions: Option<u32>Implementations§
Source§impl FilePersistenceConfig
impl FilePersistenceConfig
Sourcepub fn state_path(&self) -> PathBuf
pub fn state_path(&self) -> PathBuf
Get the full path for state storage
Sourcepub fn prompts_path(&self) -> PathBuf
pub fn prompts_path(&self) -> PathBuf
Get the full path for prompts storage
Sourcepub fn vector_db_path(&self) -> PathBuf
pub fn vector_db_path(&self) -> PathBuf
Get the full path for vector database storage
Sourcepub fn agent_contexts_path(&self) -> PathBuf
pub fn agent_contexts_path(&self) -> PathBuf
Get the full path for agent contexts (within state directory)
Sourcepub fn sessions_path(&self) -> PathBuf
pub fn sessions_path(&self) -> PathBuf
Get the full path for sessions (within state directory)
Sourcepub async fn ensure_directories(&self) -> Result<(), Error>
pub async fn ensure_directories(&self) -> Result<(), Error>
Create all configured directories if they don’t exist
Sourcepub async fn migrate_from_legacy(
legacy_path: PathBuf,
) -> Result<Self, MigrationError>
pub async fn migrate_from_legacy( legacy_path: PathBuf, ) -> Result<Self, MigrationError>
Migrate from legacy storage_path to new structure
Trait Implementations§
Source§impl Clone for FilePersistenceConfig
impl Clone for FilePersistenceConfig
Source§fn clone(&self) -> FilePersistenceConfig
fn clone(&self) -> FilePersistenceConfig
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 FilePersistenceConfig
impl Debug for FilePersistenceConfig
Source§impl Default for FilePersistenceConfig
impl Default for FilePersistenceConfig
Source§impl<'de> Deserialize<'de> for FilePersistenceConfig
impl<'de> Deserialize<'de> for FilePersistenceConfig
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 FilePersistenceConfig
impl RefUnwindSafe for FilePersistenceConfig
impl Send for FilePersistenceConfig
impl Sync for FilePersistenceConfig
impl Unpin for FilePersistenceConfig
impl UnwindSafe for FilePersistenceConfig
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> 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>
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 more