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§impl Debug for CommandPreview
impl Debug for CommandPreview
impl Eq for CommandPreview
Source§impl PartialEq for CommandPreview
impl PartialEq for CommandPreview
impl StructuralPartialEq for CommandPreview
Auto Trait Implementations§
impl Forget for CommandPreview
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