Struct git_stree::SubtreeConfig
source · [−]pub struct SubtreeConfig { /* private fields */ }
Expand description
Configuration for a subtree
Implementations
sourceimpl SubtreeConfig
impl SubtreeConfig
sourcepub fn pull_pre_releases(&self) -> &bool
pub fn pull_pre_releases(&self) -> &bool
true
if this subtree should also pull pre release tags e.g. “1.0.3-23-alpah”
sourceimpl SubtreeConfig
impl SubtreeConfig
sourcepub const fn new(
id: String,
follow: Option<String>,
origin: Option<String>,
upstream: Option<String>,
pull_pre_releases: bool
) -> Self
pub const fn new(
id: String,
follow: Option<String>,
origin: Option<String>,
upstream: Option<String>,
pull_pre_releases: bool
) -> Self
Return a new instance
sourcepub const fn is_pullable(&self) -> bool
pub const fn is_pullable(&self) -> bool
Return true
if upstream is set
sourcepub const fn is_pushable(&self) -> bool
pub const fn is_pushable(&self) -> bool
Return true
if origin is set
sourcepub fn config_file(&self) -> String
pub fn config_file(&self) -> String
Return path to config file
sourcepub fn ref_to_pull(&self) -> Result<String, PosixError>
pub fn ref_to_pull(&self) -> Result<String, PosixError>
Figure out which named ref to pull from.
Panics
Will panic if &self
has no upstream remote defined
Errors
Will return a PosixError
when fails to find a ref to pull
Trait Implementations
sourceimpl Clone for SubtreeConfig
impl Clone for SubtreeConfig
sourcefn clone(&self) -> SubtreeConfig
fn clone(&self) -> SubtreeConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubtreeConfig
impl Debug for SubtreeConfig
sourceimpl PartialEq<SubtreeConfig> for SubtreeConfig
impl PartialEq<SubtreeConfig> for SubtreeConfig
sourcefn eq(&self, other: &SubtreeConfig) -> bool
fn eq(&self, other: &SubtreeConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SubtreeConfig) -> bool
fn ne(&self, other: &SubtreeConfig) -> bool
This method tests for !=
.
impl Eq for SubtreeConfig
impl StructuralEq for SubtreeConfig
impl StructuralPartialEq for SubtreeConfig
Auto Trait Implementations
impl RefUnwindSafe for SubtreeConfig
impl Send for SubtreeConfig
impl Sync for SubtreeConfig
impl Unpin for SubtreeConfig
impl UnwindSafe for SubtreeConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more