pub struct OrbitonConfig {
pub project: ProjectConfig,
pub dev_server: DevServerConfig,
pub hmr: HmrConfig,
pub build: BuildConfig,
pub lint: LintConfig,
}
Expand description
Main configuration structure for Orbiton
Fields§
§project: ProjectConfig
Project configuration
dev_server: DevServerConfig
Development server configuration
hmr: HmrConfig
Hot Module Reload configuration
build: BuildConfig
Build configuration
lint: LintConfig
Linting configuration
Implementations§
Source§impl OrbitonConfig
impl OrbitonConfig
Sourcepub fn load_from_project(project_dir: &Path) -> Result<Self>
pub fn load_from_project(project_dir: &Path) -> Result<Self>
Load configuration from a .orbiton.toml file
Searches for the configuration file in the following order:
- Current directory
- Parent directories (walking up the tree)
- Uses default configuration if no file found
Sourcepub fn load_from_file(path: &Path) -> Result<Self>
pub fn load_from_file(path: &Path) -> Result<Self>
Load configuration from a specific file
Sourcepub fn find_config_file(start_dir: &Path) -> Option<PathBuf>
pub fn find_config_file(start_dir: &Path) -> Option<PathBuf>
Find the nearest .orbiton.toml file by walking up the directory tree
Sourcepub fn save_to_file(&self, path: &Path) -> Result<()>
pub fn save_to_file(&self, path: &Path) -> Result<()>
Save configuration to a file
Sourcepub fn create_default_config(project_dir: &Path) -> Result<PathBuf>
pub fn create_default_config(project_dir: &Path) -> Result<PathBuf>
Create a default configuration file in the specified directory
Sourcepub fn merge_with(&mut self, other: &OrbitonConfig)
pub fn merge_with(&mut self, other: &OrbitonConfig)
Merge with another configuration (other takes precedence)
Trait Implementations§
Source§impl Clone for OrbitonConfig
impl Clone for OrbitonConfig
Source§fn clone(&self) -> OrbitonConfig
fn clone(&self) -> OrbitonConfig
Returns a copy 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 OrbitonConfig
impl Debug for OrbitonConfig
Source§impl Default for OrbitonConfig
impl Default for OrbitonConfig
Source§fn default() -> OrbitonConfig
fn default() -> OrbitonConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OrbitonConfig
impl<'de> Deserialize<'de> for OrbitonConfig
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 OrbitonConfig
impl RefUnwindSafe for OrbitonConfig
impl Send for OrbitonConfig
impl Sync for OrbitonConfig
impl Unpin for OrbitonConfig
impl UnwindSafe for OrbitonConfig
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> 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