pub struct WorkspaceConfig {
pub config: Config,
pub repos: Vec<RepoEntry>,
}
Fields§
§config: Config
§repos: Vec<RepoEntry>
Implementations§
Source§impl WorkspaceConfig
impl WorkspaceConfig
pub const DEFAULT_PATH: &'static str = "config.yml"
pub fn exists(dir: &Path) -> bool
pub fn from_dir(dir: &Path) -> Result<Self, Error>
pub fn from_path(path: &Path) -> Result<Self, Error>
pub fn from_file(file: &File) -> Result<Self, Error>
Sourcepub fn add(&mut self, repo_info: RepoInfo, path: Option<String>)
pub fn add(&mut self, repo_info: RepoInfo, path: Option<String>)
Adds the repo to this configuration’s list of repos. If a repo with the same name already exists, it is overwritten.
pub fn get_entry(&self, name: &str) -> Option<&RepoEntry>
pub fn merge(&mut self, other: WorkspaceConfig)
Trait Implementations§
Source§impl Clone for WorkspaceConfig
impl Clone for WorkspaceConfig
Source§fn clone(&self) -> WorkspaceConfig
fn clone(&self) -> WorkspaceConfig
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 WorkspaceConfig
impl Debug for WorkspaceConfig
Source§impl Default for WorkspaceConfig
impl Default for WorkspaceConfig
Source§impl<'de> Deserialize<'de> for WorkspaceConfig
impl<'de> Deserialize<'de> for WorkspaceConfig
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
Source§impl PartialEq for WorkspaceConfig
impl PartialEq for WorkspaceConfig
Source§impl Serialize for WorkspaceConfig
impl Serialize for WorkspaceConfig
impl StructuralPartialEq for WorkspaceConfig
Auto Trait Implementations§
impl Freeze for WorkspaceConfig
impl RefUnwindSafe for WorkspaceConfig
impl Send for WorkspaceConfig
impl Sync for WorkspaceConfig
impl Unpin for WorkspaceConfig
impl UnwindSafe for WorkspaceConfig
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