pub struct RepoConfig {
pub protected_branches: Option<Vec<String>>,
pub capacity: Option<usize>,
}
Fields§
§protected_branches: Option<Vec<String>>
§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 protected_branches(&self) -> &[String]
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 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 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> 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