pub struct Config {
pub config_path: PathBuf,
pub defaults: Defaults,
pub cache: CacheSettings,
pub projects: Vec<Project>,
pub series: Vec<Series>,
pub hosts: Vec<Host>,
pub suite_rules: Vec<ExtraRule>,
pub path_translations: PathTranslations,
}Fields§
§config_path: PathBuf§defaults: Defaults§cache: CacheSettings§projects: Vec<Project>§series: Vec<Series>§hosts: Vec<Host>§suite_rules: Vec<ExtraRule>§path_translations: PathTranslationsImplementations§
Source§impl Config
impl Config
Sourcepub fn self_project(&self) -> Option<&Project>
pub fn self_project(&self) -> Option<&Project>
The one project whose snapshots come from the working repo, if any.
from_raw refuses a config with more than one.
pub fn load(path: &Path) -> Result<Self, ConfigError>
pub fn from_raw( config_path: PathBuf, raw: ConfigFile, ) -> Result<Self, ConfigError>
pub fn project(&self, name: &ProjectName) -> Result<&Project, ConfigError>
pub fn host(&self, name: &HostName) -> Result<&Host, ConfigError>
pub fn series_by_name(&self, name: &SeriesName) -> Result<&Series, ConfigError>
Sourcepub fn projects_missing_from_series(&self, series: &Series) -> Vec<ProjectName>
pub fn projects_missing_from_series(&self, series: &Series) -> Vec<ProjectName>
Projects configured globally but not pinned by series, sorted alphabetically.
Sourcepub fn series_by_name_with_coverage_check(
&self,
name: &SeriesName,
) -> Result<&Series, ConfigError>
pub fn series_by_name_with_coverage_check( &self, name: &SeriesName, ) -> Result<&Series, ConfigError>
Like series_by_name but also emits a
tracing::warn! per configured project the series does not pin.
pub fn snapshot_dir(&self) -> PathBuf
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move 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