pub struct BookmarkName(/* private fields */);Expand description
A validated jj bookmark name (jj’s equivalent of a git branch). Every
JjApi operation that names a bookmark to create, move, rename, delete,
track, fetch, or push takes a BookmarkName, so a name from untrusted input
is validated once, at construction. jj bookmark names are permissive, so the
guarantee is the load-bearing one: non-empty and not flag-shaped (no leading
-), matching the injection guard these operations applied internally before.
The typed methods additionally wrap the name in jj’s exact: string pattern
so a */? in a name can never fan the operation out across every bookmark.
A rejected name is an vcs_cli_support::is_invalid_input failure.
Implementations§
Trait Implementations§
Source§impl Clone for BookmarkName
impl Clone for BookmarkName
Source§fn clone(&self) -> BookmarkName
fn clone(&self) -> BookmarkName
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 BookmarkName
impl Debug for BookmarkName
Source§impl Display for BookmarkName
impl Display for BookmarkName
impl Eq for BookmarkName
Source§impl FromStr for BookmarkName
impl FromStr for BookmarkName
Source§impl Hash for BookmarkName
impl Hash for BookmarkName
Source§impl PartialEq for BookmarkName
impl PartialEq for BookmarkName
impl StructuralPartialEq for BookmarkName
Auto Trait Implementations§
impl Freeze for BookmarkName
impl RefUnwindSafe for BookmarkName
impl Send for BookmarkName
impl Sync for BookmarkName
impl Unpin for BookmarkName
impl UnsafeUnpin for BookmarkName
impl UnwindSafe for BookmarkName
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