#[non_exhaustive]pub enum PathProblem {
NamesNothing,
Magic,
Absolute,
Relative,
TrailingSlash,
Glob(char),
BadComponent,
}Expand description
Why a path token is not a literal, root-relative file or directory.
git ls-tree does not glob, so a wildcard would match nothing and
silently fingerprint nothing; every other shape here is a path git would
interpret rather than look up.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NamesNothing
? alone.
Magic
Starts with :, git’s pathspec magic.
Absolute
Starts with /.
Relative
Starts with ./ or ../.
TrailingSlash
Ends with /.
Glob(char)
Contains a glob or escape character.
BadComponent
Has an empty, . or .. component.
Trait Implementations§
Source§impl Clone for PathProblem
impl Clone for PathProblem
Source§impl Debug for PathProblem
impl Debug for PathProblem
Source§impl Display for PathProblem
impl Display for PathProblem
impl Eq for PathProblem
Source§impl PartialEq for PathProblem
impl PartialEq for PathProblem
impl StructuralPartialEq for PathProblem
Auto Trait Implementations§
impl Freeze for PathProblem
impl RefUnwindSafe for PathProblem
impl Send for PathProblem
impl Sync for PathProblem
impl Unpin for PathProblem
impl UnsafeUnpin for PathProblem
impl UnwindSafe for PathProblem
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