pub struct ConfigFile {
pub config: FallowConfig,
pub path: Option<PathBuf>,
}Expand description
The config file of a project, before resolution.
Fields§
§config: FallowConfigThe parsed config. This is the default config when no file exists.
path: Option<PathBuf>The path of the loaded file. None when no file exists.
Implementations§
Source§impl ConfigFile
impl ConfigFile
Sourcepub fn for_analysis(
self,
analysis: ProductionAnalysis,
flags: ProductionFlags,
) -> Self
pub fn for_analysis( self, analysis: ProductionAnalysis, flags: ProductionFlags, ) -> Self
Flatten the production setting of the config for one analysis: the
flags decide first, then the config. A project without a config file
gets the mode of the flags.
Sourcepub fn validate(&self, root: &Path) -> EngineResult<()>
pub fn validate(&self, root: &Path) -> EngineResult<()>
Validate the external plugins, the boundaries and the rule packs of the config.
§Errors
Returns an error that names the first invalid part and lists each of its problems.
Sourcepub fn resolve(self, root: &Path, options: ResolveOptions) -> ResolvedConfig
pub fn resolve(self, root: &Path, options: ResolveOptions) -> ResolvedConfig
Resolve the config for root, then apply the environment variables
that every host honors.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ConfigFile
impl Freeze for ConfigFile
impl Move for ConfigFile
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnsafeUnpin for ConfigFile
impl UnwindSafe for ConfigFile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more