pub struct Config {
pub project: ProjectConfig,
pub pipeline: PipelineConfig,
pub labels: LabelConfig,
pub multi_repo: MultiRepoConfig,
pub models: ModelConfig,
pub repos: HashMap<String, PathBuf>,
}Fields§
§project: ProjectConfig§pipeline: PipelineConfig§labels: LabelConfig§multi_repo: MultiRepoConfig§models: ModelConfig§repos: HashMap<String, PathBuf>Implementations§
Source§impl Config
impl Config
Sourcepub fn load(project_dir: &Path) -> Result<Self>
pub fn load(project_dir: &Path) -> Result<Self>
Load config by merging user defaults with project overrides.
User config: ~/.config/oven/recipe.toml
Project config: recipe.toml in project_dir
Missing files are not errors - defaults are used instead.
Sourcepub fn resolve_repo(&self, name: &str) -> Result<PathBuf>
pub fn resolve_repo(&self, name: &str) -> Result<PathBuf>
Resolve a repo name to a local path.
Returns an error if the repo name is not in the config or the path doesn’t exist.
Sourcepub fn default_user_toml() -> String
pub fn default_user_toml() -> String
Generate a starter user TOML for ~/.config/oven/recipe.toml.
Sourcepub fn default_project_toml() -> String
pub fn default_project_toml() -> String
Generate a starter project TOML for oven prep.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin 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