pub trait ConfigurationFile<T> {
    const FILENAME: &'static str;

    fn from_directory(monorepo_root: &Path, directory: &Path) -> Result<T>;
    fn directory(&self) -> PathBuf;
    fn path(&self) -> PathBuf;
    fn write(&self) -> Result<()>;
}
Expand description

Configuration file for some component of the monorepo.

Required Associated Constants§

source

const FILENAME: &'static str

Basename of the configuration file.

Required Methods§

source

fn from_directory(monorepo_root: &Path, directory: &Path) -> Result<T>

Create an instance of this configuration file by reading the specified file from this directory on disk.

source

fn directory(&self) -> PathBuf

Relative path to directory containing this configuration file, from monorepo root.

source

fn path(&self) -> PathBuf

Relative path to this configuration file from the monorepo root.

source

fn write(&self) -> Result<()>

Write this configuration file to disk.

Implementors§