pub struct RailConfig {
pub targets: Vec<String>,
pub unify: UnifyConfig,
pub release: ReleaseConfig,
pub change_detection: ChangeDetectionConfig,
pub run: RunConfig,
pub crates: HashMap<String, CrateConfig>,
}Expand description
Configuration for cargo-rail Searched in order: rail.toml, .rail.toml, .cargo/rail.toml, .config/rail.toml
Fields§
§targets: Vec<String>Target triples for multi-platform validation (workspace-wide)
Detected via cargo rail init, used by multiple commands
unify: UnifyConfigDependency unification settings
release: ReleaseConfigRelease management settings
change_detection: ChangeDetectionConfigChange detection settings (for planner classification)
run: RunConfigRun profile settings for cargo rail run.
crates: HashMap<String, CrateConfig>Per-crate configuration (overrides workspace defaults)
Implementations§
Source§impl RailConfig
impl RailConfig
Sourcepub fn find_config_path(path: &Path) -> Option<PathBuf>
pub fn find_config_path(path: &Path) -> Option<PathBuf>
Find config file in search order: rail.toml, .rail.toml, .cargo/rail.toml, .config/rail.toml
On Windows, this handles path canonicalization issues (UNC paths, 8.3 short names) by checking both the original path and its parent’s canonicalization.
Sourcepub fn load(path: &Path) -> RailResult<Self>
pub fn load(path: &Path) -> RailResult<Self>
Load config from rail.toml (searches multiple locations)
Sourcepub fn try_load(path: &Path) -> ConfigLoadResult
pub fn try_load(path: &Path) -> ConfigLoadResult
Try to load config, returning a result that distinguishes between “not found” and “parse error”. This is used by WorkspaceContext to properly report parse errors instead of silently falling back to defaults.
Sourcepub fn get_split_crates(&self) -> Vec<(&str, &CrateSplitConfig)>
pub fn get_split_crates(&self) -> Vec<(&str, &CrateSplitConfig)>
Get all crates that have split configuration
Sourcepub fn build_split_configs(&self) -> Vec<SplitConfig>
pub fn build_split_configs(&self) -> Vec<SplitConfig>
Build all SplitConfigs from unified crate config
Trait Implementations§
Source§impl Clone for RailConfig
impl Clone for RailConfig
Source§fn clone(&self) -> RailConfig
fn clone(&self) -> RailConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RailConfig
impl Debug for RailConfig
Source§impl<'de> Deserialize<'de> for RailConfig
impl<'de> Deserialize<'de> for RailConfig
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 RailConfig
impl RefUnwindSafe for RailConfig
impl Send for RailConfig
impl Sync for RailConfig
impl Unpin for RailConfig
impl UnwindSafe for RailConfig
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> 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