pub struct SubtreeConfig { /* private fields */ }
Expand description
Configuration for a subtree
Implementations§
Source§impl 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”
Source§impl 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§
Source§impl Clone for SubtreeConfig
impl Clone for SubtreeConfig
Source§fn clone(&self) -> SubtreeConfig
fn clone(&self) -> SubtreeConfig
Returns a duplicate 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 SubtreeConfig
impl Debug for SubtreeConfig
Source§impl Ord for SubtreeConfig
impl Ord for SubtreeConfig
Source§impl PartialEq for SubtreeConfig
impl PartialEq for SubtreeConfig
Source§impl PartialOrd for SubtreeConfig
impl PartialOrd for SubtreeConfig
impl Eq for SubtreeConfig
impl StructuralPartialEq for SubtreeConfig
Auto Trait Implementations§
impl Freeze for SubtreeConfig
impl RefUnwindSafe for SubtreeConfig
impl Send for SubtreeConfig
impl Sync for SubtreeConfig
impl Unpin for SubtreeConfig
impl UnwindSafe for SubtreeConfig
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