#[non_exhaustive]pub struct BookmarkMove {
pub name: BookmarkName,
pub to: RevsetExpr,
pub allow_backwards: bool,
}Expand description
Options for JjApi::bookmark_move (jj bookmark move <name> --to <rev>).
#[non_exhaustive], so build it through BookmarkMove::new and the chained
allow_backwards setter rather than a bare
bool (bookmark_move(name, to, true) doesn’t say what true permits).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: BookmarkNameThe bookmark to move.
to: RevsetExprThe revision to move it to (--to).
allow_backwards: boolAllow moving the bookmark to a commit that is not a descendant of its
current target (--allow-backwards).
Implementations§
Source§impl BookmarkMove
impl BookmarkMove
Sourcepub fn new(name: BookmarkName, to: RevsetExpr) -> Self
pub fn new(name: BookmarkName, to: RevsetExpr) -> Self
Move bookmark name to revision to; a backwards move is refused.
Sourcepub fn allow_backwards(self) -> Self
pub fn allow_backwards(self) -> Self
Allow moving to a commit that is not a descendant of the current target
(--allow-backwards).
Trait Implementations§
Source§impl Clone for BookmarkMove
impl Clone for BookmarkMove
Source§fn clone(&self) -> BookmarkMove
fn clone(&self) -> BookmarkMove
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 BookmarkMove
impl Debug for BookmarkMove
impl Eq for BookmarkMove
Source§impl PartialEq for BookmarkMove
impl PartialEq for BookmarkMove
impl StructuralPartialEq for BookmarkMove
Auto Trait Implementations§
impl Freeze for BookmarkMove
impl RefUnwindSafe for BookmarkMove
impl Send for BookmarkMove
impl Sync for BookmarkMove
impl Unpin for BookmarkMove
impl UnsafeUnpin for BookmarkMove
impl UnwindSafe for BookmarkMove
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