pub struct EnvConfig {
pub base_url: Option<String>,
pub auth_token: Option<String>,
pub model: Option<String>,
pub extras: HashMap<String, String>,
}Expand description
Configuration values from environment
Fields§
§base_url: Option<String>Base URL for the AI API
auth_token: Option<String>Authentication token
model: Option<String>Model to use
extras: HashMap<String, String>Additional raw env values (AI_* prefixed)
Implementations§
Source§impl EnvConfig
impl EnvConfig
Sourcepub fn load() -> Self
pub fn load() -> Self
Load env config from .env file and environment variables Searches for .env in: current directory, then parent directories, then exe directory Also loads from ~/.ai/settings.json
Sourcepub fn load_from_dir(dir: &str) -> Self
pub fn load_from_dir(dir: &str) -> Self
Load env config from a specific directory
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnvConfig
impl RefUnwindSafe for EnvConfig
impl Send for EnvConfig
impl Sync for EnvConfig
impl Unpin for EnvConfig
impl UnsafeUnpin for EnvConfig
impl UnwindSafe for EnvConfig
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