pub struct PartialConfig {
pub initialized: Option<bool>,
pub version: Option<String>,
pub update_channel: Option<String>,
pub auto_update: Option<bool>,
pub clippy_rules: Option<Vec<String>>,
pub max_file_lines: Option<usize>,
pub max_function_lines: Option<usize>,
pub required_edition: Option<String>,
pub required_rust_version: Option<String>,
pub ban_underscore_bandaid: Option<bool>,
pub require_documentation: Option<bool>,
pub custom_rules: Option<Vec<CustomRule>>,
}Expand description
Partial configuration that allows optional fields for merging
Fields§
§initialized: Option<bool>Whether Ferrous Forge has been initialized
version: Option<String>Version of the configuration format
update_channel: Option<String>Update channel (stable, beta, nightly)
auto_update: Option<bool>Whether to automatically check for updates
clippy_rules: Option<Vec<String>>Custom clippy rules
max_file_lines: Option<usize>File size limit in lines
max_function_lines: Option<usize>Function size limit in lines
required_edition: Option<String>Required Rust edition (locked)
required_rust_version: Option<String>Required minimum rust-version (locked)
ban_underscore_bandaid: Option<bool>Whether to ban underscore bandaid patterns
require_documentation: Option<bool>Whether to require documentation
custom_rules: Option<Vec<CustomRule>>Custom validation rules
Implementations§
Source§impl PartialConfig
impl PartialConfig
Sourcepub async fn load_from_level(level: ConfigLevel) -> Result<Option<Self>>
pub async fn load_from_level(level: ConfigLevel) -> Result<Option<Self>>
Load partial config from a specific level
Sourcepub fn merge(self, other: PartialConfig) -> Self
pub fn merge(self, other: PartialConfig) -> Self
Merge another partial config into this one (other takes precedence)
Sourcepub fn to_full_config(self) -> Config
pub fn to_full_config(self) -> Config
Convert to full config, using defaults for missing values
Trait Implementations§
Source§impl Clone for PartialConfig
impl Clone for PartialConfig
Source§fn clone(&self) -> PartialConfig
fn clone(&self) -> PartialConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartialConfig
impl Debug for PartialConfig
Source§impl Default for PartialConfig
impl Default for PartialConfig
Source§fn default() -> PartialConfig
fn default() -> PartialConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PartialConfig
impl<'de> Deserialize<'de> for PartialConfig
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
Auto Trait Implementations§
impl Freeze for PartialConfig
impl RefUnwindSafe for PartialConfig
impl Send for PartialConfig
impl Sync for PartialConfig
impl Unpin for PartialConfig
impl UnsafeUnpin for PartialConfig
impl UnwindSafe for PartialConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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