pub struct Settings {
pub database: DatabaseConfig,
pub server: ServerConfig,
pub mcp: McpConfig,
pub tui: TuiConfig,
pub behavior: BehaviorConfig,
pub embeddings: EmbeddingsConfig,
pub sync: SyncConfig,
pub crypto: CryptoConfig,
}Expand description
Configuración global de Mneme.
Fields§
§database: DatabaseConfigConfiguración de base de datos.
server: ServerConfigConfiguración de servidor HTTP.
mcp: McpConfigConfiguración MCP.
tui: TuiConfigConfiguración TUI.
behavior: BehaviorConfigConfiguración de comportamiento.
embeddings: EmbeddingsConfigConfiguración de embeddings.
sync: SyncConfigConfiguración de sincronización.
crypto: CryptoConfigConfiguración de encriptación.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Carga la configuración desde el archivo de configuración. Si no existe, crea uno con valores por defecto.
Sourcepub fn save(&self) -> Result<()>
pub fn save(&self) -> Result<()>
Guarda la configuración actual en el archivo de configuración.
Sourcepub fn config_path() -> PathBuf
pub fn config_path() -> PathBuf
Retorna la ruta al archivo de configuración.
Sourcepub fn apply_env_overrides(&mut self)
pub fn apply_env_overrides(&mut self)
Aplica sobre-escrituras desde variables de entorno.
Sourcepub fn infer_project() -> String
pub fn infer_project() -> String
Infiere el nombre del proyecto actual. Intenta obtener el directorio raíz de git; si falla, usa el directorio actual.
Sourcepub fn git_toplevel() -> Option<PathBuf>
pub fn git_toplevel() -> Option<PathBuf>
Ejecuta git rev-parse --show-toplevel para obtener la raíz del repo.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
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 Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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