pub struct SbeConfig {
pub profiles: HashMap<String, ProfileConfig>,
}Expand description
Top-level configuration file structure (.sbe.yaml or ~/.config/sbe/config.yaml).
Fields§
§profiles: HashMap<String, ProfileConfig>Profile overrides keyed by profile name.
Implementations§
Source§impl SbeConfig
impl SbeConfig
Sourcepub async fn load(path: &Path) -> Result<Option<Self>, CoreError>
pub async fn load(path: &Path) -> Result<Option<Self>, CoreError>
Load config from a YAML file. Returns Ok(None) if the file does not exist.
Sourcepub fn find_project_config(start: &Path) -> Option<PathBuf>
pub fn find_project_config(start: &Path) -> Option<PathBuf>
Find the project config by walking up from start to the filesystem root,
stopping at a git repository boundary. Checks both .sbe.yaml and .sbe.yml.
Sourcepub fn global_config_path() -> Option<PathBuf>
pub fn global_config_path() -> Option<PathBuf>
The global config path: ~/.config/sbe/config.yaml.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SbeConfig
impl<'de> Deserialize<'de> for SbeConfig
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 SbeConfig
impl RefUnwindSafe for SbeConfig
impl Send for SbeConfig
impl Sync for SbeConfig
impl Unpin for SbeConfig
impl UnsafeUnpin for SbeConfig
impl UnwindSafe for SbeConfig
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