pub struct RepoConfig {Show 14 fields
pub editor: Option<String>,
pub protected_branches: Option<Vec<String>>,
pub protect_commit_count: Option<usize>,
pub protect_commit_age: Option<Duration>,
pub auto_base_commit_count: Option<usize>,
pub stack: Option<Stack>,
pub push_remote: Option<String>,
pub pull_remote: Option<String>,
pub show_format: Option<Format>,
pub show_commits: Option<ShowCommits>,
pub show_stacked: Option<bool>,
pub auto_fixup: Option<Fixup>,
pub auto_repair: Option<bool>,
pub capacity: Option<usize>,
}
Fields§
§editor: Option<String>
§protected_branches: Option<Vec<String>>
§protect_commit_count: Option<usize>
§protect_commit_age: Option<Duration>
§auto_base_commit_count: Option<usize>
§stack: Option<Stack>
§push_remote: Option<String>
§pull_remote: Option<String>
§show_format: Option<Format>
§show_commits: Option<ShowCommits>
§show_stacked: Option<bool>
§auto_fixup: Option<Fixup>
§auto_repair: Option<bool>
§capacity: Option<usize>
Implementations§
Source§impl RepoConfig
impl RepoConfig
pub fn from_all(repo: &Repository) -> Result<Self>
pub fn from_repo(repo: &Repository) -> Result<Self>
pub fn from_workdir(repo: &Repository) -> Result<Self>
pub fn from_env() -> Self
pub fn from_defaults() -> Self
pub fn from_gitconfig(config: &Config) -> Self
pub fn write_repo(&self, repo: &Repository) -> Result<()>
pub fn to_gitconfig(&self, config: &mut Config) -> Result<()>
pub fn update(self, other: Self) -> Self
pub fn editor(&self) -> &str
pub fn protected_branches(&self) -> &[String]
pub fn protect_commit_count(&self) -> Option<usize>
pub fn protect_commit_age(&self) -> Duration
pub fn auto_base_commit_count(&self) -> Option<usize>
pub fn push_remote(&self) -> &str
pub fn pull_remote(&self) -> &str
pub fn stack(&self) -> Stack
pub fn show_format(&self) -> Format
pub fn show_commits(&self) -> ShowCommits
pub fn show_stacked(&self) -> bool
pub fn auto_fixup(&self) -> Fixup
pub fn auto_repair(&self) -> bool
pub fn capacity(&self) -> Option<usize>
Trait Implementations§
Source§impl Clone for RepoConfig
impl Clone for RepoConfig
Source§fn clone(&self) -> RepoConfig
fn clone(&self) -> RepoConfig
Returns a copy 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 RepoConfig
impl Debug for RepoConfig
Source§impl Default for RepoConfig
impl Default for RepoConfig
Source§fn default() -> RepoConfig
fn default() -> RepoConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RepoConfig
impl RefUnwindSafe for RepoConfig
impl Send for RepoConfig
impl Sync for RepoConfig
impl Unpin for RepoConfig
impl UnwindSafe for RepoConfig
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more