pub struct CommandPreview {
pub spec: JjCommandSpec,
pub title: String,
pub command_line: String,
pub execution_mode: ExecutionMode,
pub safety: SafetyClass,
pub refresh_plan: RefreshPlan,
pub warnings: Vec<CommandPreviewWarning>,
}Expand description
Command data shown before a command is allowed to run.
Fields§
§spec: JjCommandSpecThe executable spec that confirmation should run.
title: StringShort command title used by the source view.
command_line: StringFull jj command line, including global options in process order.
execution_mode: ExecutionModeExecution mode that determines the confirmation behavior.
safety: SafetyClassSafety classification shown to the user.
refresh_plan: RefreshPlanRefresh policy requested after a successful command.
warnings: Vec<CommandPreviewWarning>User-visible warnings inferred from the command spec.
Implementations§
Source§impl CommandPreview
impl CommandPreview
Sourcepub fn from_spec(spec: &JjCommandSpec) -> Self
pub fn from_spec(spec: &JjCommandSpec) -> Self
Builds a preview from the same command spec that execution will receive.
Sourcepub const fn requires_confirmation(&self) -> bool
pub const fn requires_confirmation(&self) -> bool
Returns whether the preview represents a command that needs confirmation.
Trait Implementations§
Source§impl Clone for CommandPreview
impl Clone for CommandPreview
Source§fn clone(&self) -> CommandPreview
fn clone(&self) -> CommandPreview
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 CommandPreview
impl Debug for CommandPreview
impl Eq for CommandPreview
Source§impl PartialEq for CommandPreview
impl PartialEq for CommandPreview
Source§fn eq(&self, other: &CommandPreview) -> bool
fn eq(&self, other: &CommandPreview) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommandPreview
Auto Trait Implementations§
impl Freeze for CommandPreview
impl RefUnwindSafe for CommandPreview
impl Send for CommandPreview
impl Sync for CommandPreview
impl Unpin for CommandPreview
impl UnsafeUnpin for CommandPreview
impl UnwindSafe for CommandPreview
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