pub struct RevsetExpr(/* private fields */);Expand description
A validated revset expression. Every JjApi operation that resolves a
revision/revset takes a RevsetExpr (directly or inside its options struct),
so a revset from untrusted input (UIs, bots, agents) is validated once, at
construction, and the type is the flag-injection barrier from then on.
Deliberately minimal — jj’s revset grammar is too rich to validate here —
it only guarantees the expression is non-empty and cannot be parsed as a flag
(no leading -). A rejected expression is an vcs_cli_support::is_invalid_input
failure. For a value that must be a bookmark name (create/move/delete a
bookmark) use BookmarkName.
Implementations§
Trait Implementations§
Source§impl Clone for RevsetExpr
impl Clone for RevsetExpr
Source§fn clone(&self) -> RevsetExpr
fn clone(&self) -> RevsetExpr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RevsetExpr
impl Debug for RevsetExpr
Source§impl Display for RevsetExpr
impl Display for RevsetExpr
impl Eq for RevsetExpr
Source§impl FromStr for RevsetExpr
impl FromStr for RevsetExpr
Source§impl Hash for RevsetExpr
impl Hash for RevsetExpr
Source§impl PartialEq for RevsetExpr
impl PartialEq for RevsetExpr
impl StructuralPartialEq for RevsetExpr
Auto Trait Implementations§
impl Freeze for RevsetExpr
impl RefUnwindSafe for RevsetExpr
impl Send for RevsetExpr
impl Sync for RevsetExpr
impl Unpin for RevsetExpr
impl UnsafeUnpin for RevsetExpr
impl UnwindSafe for RevsetExpr
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