pub struct SubmoduleConfigSet {
pub warnings: Vec<ParseWarning>,
/* private fields */
}Expand description
The parsed set of all submodules from one .gitmodules, the analogue of the
path/name-keyed submodule_cache. Lookups are by name or by bound path,
matching git’s submodule_from_name / submodule_from_path.
Fields§
§warnings: Vec<ParseWarning>Non-fatal diagnostics produced during parsing, in encounter order.
Implementations§
Source§impl SubmoduleConfigSet
impl SubmoduleConfigSet
Sourcepub fn parse(config: &GitConfig) -> Self
pub fn parse(config: &GitConfig) -> Self
Parse a typed submodule set from an already-loaded .gitmodules
GitConfig. This is the moral equivalent of git driving
parse_config over every submodule.*.* key in the blob.
Per-key precedence matches git’s parse_config with overwrite == 0:
the FIRST value of a key wins and later duplicates emit a
ParseWarning::MultipleConfig (git’s warn_multiple_config).
Sourcepub fn iter(&self) -> impl Iterator<Item = &Submodule>
pub fn iter(&self) -> impl Iterator<Item = &Submodule>
All parsed submodules, in .gitmodules declaration order.
Sourcepub fn from_name(&self, name: &str) -> Option<&Submodule>
pub fn from_name(&self, name: &str) -> Option<&Submodule>
submodule_from_name: look up by the .gitmodules subsection name.
Trait Implementations§
Source§impl Clone for SubmoduleConfigSet
impl Clone for SubmoduleConfigSet
Source§fn clone(&self) -> SubmoduleConfigSet
fn clone(&self) -> SubmoduleConfigSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SubmoduleConfigSet
impl Debug for SubmoduleConfigSet
Source§impl Default for SubmoduleConfigSet
impl Default for SubmoduleConfigSet
Source§fn default() -> SubmoduleConfigSet
fn default() -> SubmoduleConfigSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SubmoduleConfigSet
impl RefUnwindSafe for SubmoduleConfigSet
impl Send for SubmoduleConfigSet
impl Sync for SubmoduleConfigSet
impl Unpin for SubmoduleConfigSet
impl UnsafeUnpin for SubmoduleConfigSet
impl UnwindSafe for SubmoduleConfigSet
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