pub struct RyoConfig {
pub project: ProjectConfig,
pub modules: HashMap<String, ModuleConfig>,
pub import: ImportConfig,
pub mutations: MutationConfig,
pub suggest: SuggestConfig,
}Expand description
Project configuration loaded from ryo.toml
Fields§
§project: ProjectConfigProject metadata
modules: HashMap<String, ModuleConfig>Module-specific settings
import: ImportConfigImport settings
mutations: MutationConfigMutation execution settings
suggest: SuggestConfigSuggestion settings
Implementations§
Source§impl RyoConfig
impl RyoConfig
Sourcepub fn load(dir: impl AsRef<Path>) -> Result<Self, ConfigError>
pub fn load(dir: impl AsRef<Path>) -> Result<Self, ConfigError>
Load config from a directory (looks for ryo.toml)
Sourcepub fn load_from_path(path: impl AsRef<Path>) -> Result<Self, ConfigError>
pub fn load_from_path(path: impl AsRef<Path>) -> Result<Self, ConfigError>
Load config from a specific path
Sourcepub fn load_or_default(dir: impl AsRef<Path>) -> Self
pub fn load_or_default(dir: impl AsRef<Path>) -> Self
Load config or return default if not found
Sourcepub fn save(&self, dir: impl AsRef<Path>) -> Result<(), ConfigError>
pub fn save(&self, dir: impl AsRef<Path>) -> Result<(), ConfigError>
Save config to a directory
Sourcepub fn save_to_path(&self, path: impl AsRef<Path>) -> Result<(), ConfigError>
pub fn save_to_path(&self, path: impl AsRef<Path>) -> Result<(), ConfigError>
Save config to a specific path
Sourcepub fn get_module_config(&self, path: &str) -> Option<&ModuleConfig>
pub fn get_module_config(&self, path: &str) -> Option<&ModuleConfig>
Get module config for a file path.
Only matches file path patterns (keys without ::).
For SymbolPath matching, use get_module_config_for_symbol.
Sourcepub fn get_module_config_for_symbol(
&self,
symbol_path: &str,
) -> Option<&ModuleConfig>
pub fn get_module_config_for_symbol( &self, symbol_path: &str, ) -> Option<&ModuleConfig>
Get module config for a symbol path.
Matches against SymbolPath patterns (keys containing ::).
Supports wildcards: * matches any segment.
§Example patterns
my_crate::generated- exact matchmy_crate::generated::*- any symbol under generated*::tests::*- any test module in any crate
Sourcepub fn should_skip_lint(&self, path: &str) -> bool
pub fn should_skip_lint(&self, path: &str) -> bool
Check if a module should be skipped for lint
Sourcepub fn should_skip_refactor(&self, path: &str) -> bool
pub fn should_skip_refactor(&self, path: &str) -> bool
Check if a module should be skipped for refactor
Sourcepub fn is_rule_enabled_for_symbol(
&self,
symbol_path: &str,
rule_id: &str,
) -> bool
pub fn is_rule_enabled_for_symbol( &self, symbol_path: &str, rule_id: &str, ) -> bool
Check if a rule is enabled for a symbol path.
Checks module-level disabled_rules first, then falls back to global suggest config.
Sourcepub fn is_rule_enabled_for_file(&self, file_path: &str, rule_id: &str) -> bool
pub fn is_rule_enabled_for_file(&self, file_path: &str, rule_id: &str) -> bool
Check if a rule is enabled for a file path.
Checks module-level disabled_rules first (using file path prefix matching), then falls back to global suggest config.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RyoConfig
impl<'de> Deserialize<'de> for RyoConfig
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>,
Auto Trait Implementations§
impl Freeze for RyoConfig
impl RefUnwindSafe for RyoConfig
impl Send for RyoConfig
impl Sync for RyoConfig
impl Unpin for RyoConfig
impl UnsafeUnpin for RyoConfig
impl UnwindSafe for RyoConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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