pub struct RevSpec(/* private fields */);Expand description
A validated revision/range expression (HEAD~2, main..feature). Every
GitApi operation that resolves a general commit-ish or range takes a
RevSpec, so an untrusted revision is validated once, at construction.
Deliberately minimal — git’s revision grammar is too rich to validate
here — it only guarantees the expression is non-empty and cannot be parsed
as a flag (no leading -). For a value that must be a genuine ref name
(to create/delete/rename a branch or tag) use the stricter RefName. A
rejected expression is an vcs_cli_support::is_invalid_input failure.
Implementations§
Trait Implementations§
impl Eq for RevSpec
Source§impl From<RevSpec> for CheckoutTarget
impl From<RevSpec> for CheckoutTarget
impl StructuralPartialEq for RevSpec
Auto Trait Implementations§
impl Freeze for RevSpec
impl RefUnwindSafe for RevSpec
impl Send for RevSpec
impl Sync for RevSpec
impl Unpin for RevSpec
impl UnsafeUnpin for RevSpec
impl UnwindSafe for RevSpec
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