pub struct AppSettings {Show 19 fields
pub autosave_override: Option<PathBuf>,
pub export_override: Option<PathBuf>,
pub api_log_override: Option<PathBuf>,
pub api_enabled: bool,
pub api_bind_addr: String,
pub api_port: u16,
pub api_key: Option<String>,
pub grpc_enabled: bool,
pub grpc_port: u16,
pub background_on_close: bool,
pub notes_dir_override: Option<PathBuf>,
pub storage_backend: StorageBackend,
pub llm_provider: LlmProvider,
pub llm_api_key: Option<String>,
pub llm_model: String,
pub llm_endpoint: Option<String>,
pub auth_config: AuthConfig,
pub embedding_model: EmbeddingModel,
pub physics_timeout_secs: u64,
}Fields§
§autosave_override: Option<PathBuf>§export_override: Option<PathBuf>§api_log_override: Option<PathBuf>§api_enabled: bool§api_bind_addr: String§api_port: u16§api_key: Option<String>§grpc_enabled: bool§grpc_port: u16§background_on_close: bool§notes_dir_override: Option<PathBuf>§storage_backend: StorageBackend§llm_provider: LlmProvider§llm_api_key: Option<String>§llm_model: String§llm_endpoint: Option<String>§auth_config: AuthConfigAuthentication configuration for API access
embedding_model: EmbeddingModelEmbedding model for semantic search
physics_timeout_secs: u64Physics timeout in seconds (0 = indefinite movement)
Implementations§
Source§impl AppSettings
impl AppSettings
pub fn load() -> Result<Self>
pub fn save(&self) -> Result<()>
pub fn autosave_dir(&self) -> PathBuf
Sourcepub fn settings_dir() -> PathBuf
pub fn settings_dir() -> PathBuf
Return the directory where the settings file (settings.json) is stored. This is OS-specific and resolves to a per-user configuration directory.
Sourcepub fn export_default_dir() -> PathBuf
pub fn export_default_dir() -> PathBuf
Default export directory when no override is set: OS temporary directory. Example: {temp_dir}/Graph-Loom/exports
Sourcepub fn export_dir(&self) -> PathBuf
pub fn export_dir(&self) -> PathBuf
Effective export directory honoring user override or falling back to OS temp.
pub fn api_endpoint(&self) -> String
Sourcepub fn api_log_default_dir() -> PathBuf
pub fn api_log_default_dir() -> PathBuf
Default API log directory when no override is set: OS temporary directory. Example: {temp_dir}/Graph-Loom/api-logs
Sourcepub fn api_log_dir(&self) -> PathBuf
pub fn api_log_dir(&self) -> PathBuf
Effective API log directory honoring user override or falling back to OS temp.
Sourcepub fn notes_default_dir() -> PathBuf
pub fn notes_default_dir() -> PathBuf
Default notes directory when no override is set: ~/Documents/Graph-Loom/notes
Trait Implementations§
Source§impl Clone for AppSettings
impl Clone for AppSettings
Source§impl Debug for AppSettings
impl Debug for AppSettings
Source§impl Default for AppSettings
impl Default for AppSettings
Source§impl<'de> Deserialize<'de> for AppSettings
impl<'de> Deserialize<'de> for AppSettings
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 Forget for AppSettings
impl Freeze for AppSettings
impl RefUnwindSafe for AppSettings
impl Send for AppSettings
impl Sync for AppSettings
impl Unpin for AppSettings
impl UnsafeUnpin for AppSettings
impl UnwindSafe for AppSettings
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request