pub struct Config {
pub provider: Provider,
pub api_key: String,
pub gitmessage_template: String,
}Fields§
§provider: Provider§api_key: String§gitmessage_template: StringImplementations§
Source§impl Config
impl Config
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Load config from environment variables Detects provider automatically based on which API key is set Priority: OPENAI_API_KEY > DEEPSEEK_API_KEY > GEMINI_API_KEY
Sourcepub fn from_env_file(path: &Path) -> Result<Self>
pub fn from_env_file(path: &Path) -> Result<Self>
Load config from .env file Supports multiple API keys with same priority as from_env()
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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