pub struct ProjectConfig { /* private fields */ }Expand description
A validated project configuration parsed from a project’s guild.toml.
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn from_file(path: &Path) -> Result<Self, ConfigError>
pub fn from_file(path: &Path) -> Result<Self, ConfigError>
Parse a project configuration from the given guild.toml path.
Sourcepub fn from_str(content: &str, root: PathBuf) -> Result<Self, ConfigError>
pub fn from_str(content: &str, root: PathBuf) -> Result<Self, ConfigError>
Parse a project configuration from a TOML string (for testing).
pub fn name(&self) -> &ProjectName
pub fn depends_on(&self) -> &[ProjectName]
pub fn targets(&self) -> &HashMap<TargetName, TargetConfig>
pub fn root(&self) -> &Path
Trait Implementations§
Source§impl Clone for ProjectConfig
impl Clone for ProjectConfig
Source§fn clone(&self) -> ProjectConfig
fn clone(&self) -> ProjectConfig
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 moreAuto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
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