#[non_exhaustive]pub struct CloneSpec {
pub branch: Option<String>,
pub depth: Option<u32>,
pub bare: bool,
}Expand description
Options for GitApi::clone_repo (git clone).
#[non_exhaustive], so build it through CloneSpec::new and the chained
setters rather than a struct literal.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.branch: Option<String>Check out this branch instead of the remote’s default (--branch).
depth: Option<u32>Shallow-clone to this many commits (--depth). git silently ignores
the flag for a plain local-path source (warns, still clones fully);
use a file:// URL to shallow-clone locally.
bare: boolCreate a bare repository (--bare).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CloneSpec
impl RefUnwindSafe for CloneSpec
impl Send for CloneSpec
impl Sync for CloneSpec
impl Unpin for CloneSpec
impl UnsafeUnpin for CloneSpec
impl UnwindSafe for CloneSpec
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