pub trait ConfigurationFile: Sized {
    type Contents: Serialize;
    const FILENAME: &'static str;
    // Required methods
    fn from_directory(
        monorepo_root: &Path,
        directory: &Path
    ) -> Result<Self, FromFileError>;
    fn directory(&self) -> PathBuf;
    fn path(&self) -> PathBuf;
    fn contents(&self) -> &Self::Contents;
    // Provided method
    fn write(
        monorepo_root: &Path,
        configuration_file: impl ConfigurationFile
    ) -> Result<(), WriteError> { ... }
}Expand description
Configuration file for some component of the monorepo.
Required Associated Types§
Required Associated Constants§
Required Methods§
sourcefn from_directory(
    monorepo_root: &Path,
    directory: &Path
) -> Result<Self, FromFileError>
 
fn from_directory( monorepo_root: &Path, directory: &Path ) -> Result<Self, FromFileError>
Create an instance of this configuration file by reading the specified file from this directory on disk.
sourcefn directory(&self) -> PathBuf
 
fn directory(&self) -> PathBuf
Relative path to directory containing this configuration file, from monorepo root.