pub enum PeelTo<'a> {
ObjectKind(Kind),
ValidObject,
RecursiveTagObject,
Path(&'a BStr),
}
Expand description
Define where a tag object should be peeled to.
Variants§
ObjectKind(Kind)
An object of the given kind.
ValidObject
Ensure the object at hand exists and is valid (actually without peeling it), without imposing any restrictions to its type. The object needs to be looked up to assure that it is valid, but it doesn’t need to be decoded.
RecursiveTagObject
Follow an annotated tag object recursively until an object is found.
Path(&'a BStr)
The path to drill into as seen relative to the current tree-ish.
Note that the path can be relative, and ./
and ../
prefixes are seen as relative to the current
working directory.
The path may be empty, which makes it refer to the tree at the current revision, similar to ^{tree}
.
Note that paths like ../
are valid and refer to a tree as seen relative to the current working directory.
Trait Implementations§
source§impl<'a> Ord for PeelTo<'a>
impl<'a> Ord for PeelTo<'a>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq for PeelTo<'a>
impl<'a> PartialEq for PeelTo<'a>
source§impl<'a> PartialOrd for PeelTo<'a>
impl<'a> PartialOrd for PeelTo<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Copy for PeelTo<'a>
impl<'a> Eq for PeelTo<'a>
impl<'a> StructuralPartialEq for PeelTo<'a>
Auto Trait Implementations§
impl<'a> Freeze for PeelTo<'a>
impl<'a> RefUnwindSafe for PeelTo<'a>
impl<'a> Send for PeelTo<'a>
impl<'a> Sync for PeelTo<'a>
impl<'a> Unpin for PeelTo<'a>
impl<'a> UnwindSafe for PeelTo<'a>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)