Struct radicle_surf::fs::Submodule
source · pub struct Submodule { /* private fields */ }
Expand description
A representation of a Git submodule when encountered in a Git repository.
Implementations§
source§impl Submodule
impl Submodule
sourcepub fn new(
name: String,
prefix: PathBuf,
submodule: Option<Submodule<'_>>,
id: Oid,
) -> Result<Self, Submodule>
pub fn new( name: String, prefix: PathBuf, submodule: Option<Submodule<'_>>, id: Oid, ) -> Result<Self, Submodule>
Construct a new Submodule
.
The path
must be the prefix location of the directory, and
so should not end in name
.
The id
is the commit pointer that Git provides when listing
a submodule.
sourcepub fn location(&self) -> &Path
pub fn location(&self) -> &Path
Return the Path
where this Submodule
is located, relative to the
git repository root.
sourcepub fn path(&self) -> PathBuf
pub fn path(&self) -> PathBuf
Return the exact path for this Submodule
, including the
name
of the submodule itself.
The path is relative to the git repository root.
Trait Implementations§
impl Eq for Submodule
impl StructuralPartialEq for Submodule
Auto Trait Implementations§
impl Freeze for Submodule
impl RefUnwindSafe for Submodule
impl Send for Submodule
impl Sync for Submodule
impl Unpin for Submodule
impl UnwindSafe for Submodule
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)