pub struct ArgusConfig {
pub llm: LlmConfig,
pub review: ReviewConfig,
pub embedding: EmbeddingConfig,
pub paths: HashMap<String, PathConfig>,
pub rules: Vec<Rule>,
}Expand description
Top-level configuration loaded from .argus.toml.
Supports layered resolution: CLI flags > env vars > local config > defaults.
§Examples
use argus_core::ArgusConfig;
let config = ArgusConfig::default();
assert_eq!(config.review.max_comments, 5);Fields§
§llm: LlmConfigLLM provider settings.
review: ReviewConfigReview behavior settings.
embedding: EmbeddingConfigEmbedding provider settings for semantic search.
paths: HashMap<String, PathConfig>Per-path overrides for monorepo support.
rules: Vec<Rule>Custom review rules injected into the LLM prompt.
Implementations§
Source§impl ArgusConfig
impl ArgusConfig
Sourcepub fn from_file(path: &Path) -> Result<Self, ArgusError>
pub fn from_file(path: &Path) -> Result<Self, ArgusError>
Load configuration from a TOML file at path.
§Errors
Returns ArgusError::Io if the file cannot be read, or
ArgusError::Toml if the content is not valid TOML.
§Examples
use argus_core::ArgusConfig;
use std::path::Path;
let config = ArgusConfig::from_file(Path::new(".argus.toml")).unwrap();Sourcepub fn from_toml(content: &str) -> Result<Self, ArgusError>
pub fn from_toml(content: &str) -> Result<Self, ArgusError>
Parse configuration from a TOML string.
§Errors
Returns ArgusError::Toml if parsing fails.
§Examples
use argus_core::ArgusConfig;
let toml = r#"
[review]
max_comments = 10
"#;
let config = ArgusConfig::from_toml(toml).unwrap();
assert_eq!(config.review.max_comments, 10);Trait Implementations§
Source§impl Clone for ArgusConfig
impl Clone for ArgusConfig
Source§fn clone(&self) -> ArgusConfig
fn clone(&self) -> ArgusConfig
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 ArgusConfig
impl Debug for ArgusConfig
Source§impl Default for ArgusConfig
impl Default for ArgusConfig
Source§fn default() -> ArgusConfig
fn default() -> ArgusConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ArgusConfig
impl<'de> Deserialize<'de> for ArgusConfig
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 ArgusConfig
impl RefUnwindSafe for ArgusConfig
impl Send for ArgusConfig
impl Sync for ArgusConfig
impl Unpin for ArgusConfig
impl UnsafeUnpin for ArgusConfig
impl UnwindSafe for ArgusConfig
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