pub enum RefNameError {
Show 15 variants
Empty,
LoneAt,
ComponentStartsDot,
DoubleDot,
IllegalChar,
AtBrace,
InvalidWildcard,
DotLock,
TrailingSlash,
LeadingSlash,
TrailingDot,
OneLevel,
ReservedBranchName,
BranchStartsWithDash,
ConsecutiveSlashes,
}Expand description
Errors returned by check_refname_format.
Variants§
Empty
The ref name is empty.
LoneAt
The ref name is exactly @.
ComponentStartsDot
A component starts with ..
DoubleDot
The ref name contains ...
IllegalChar
An illegal character was found (control chars, space, ~, ^, :, ?, [, \\).
AtBrace
The ref name contains @{{.
InvalidWildcard
The ref name contains * but --refspec-pattern was not set, or
contains more than one * with --refspec-pattern.
DotLock
A path component ends with .lock.
TrailingSlash
The ref name ends with /.
LeadingSlash
The ref name starts with / (after normalization).
TrailingDot
The ref name ends with ..
OneLevel
The ref name has only one component and --allow-onelevel was not set.
ReservedBranchName
The branch short name is reserved (e.g. HEAD).
BranchStartsWithDash
Branch short names must not begin with - (matches Git’s check_branch_ref).
ConsecutiveSlashes
The ref name has zero-length components (consecutive slashes) that cannot be normalized away.
Trait Implementations§
Source§impl Debug for RefNameError
impl Debug for RefNameError
Source§impl Display for RefNameError
impl Display for RefNameError
impl Eq for RefNameError
Source§impl Error for RefNameError
impl Error for RefNameError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RefNameError
impl PartialEq for RefNameError
impl StructuralPartialEq for RefNameError
Auto Trait Implementations§
impl Freeze for RefNameError
impl RefUnwindSafe for RefNameError
impl Send for RefNameError
impl Sync for RefNameError
impl Unpin for RefNameError
impl UnsafeUnpin for RefNameError
impl UnwindSafe for RefNameError
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.