pub struct ScriptEditor;Expand description
Handles script editing functionality for the command panel
Implementations§
Source§impl ScriptEditor
impl ScriptEditor
Sourcepub fn enter_script_mode(
state: &mut CommandPanelState,
command: &str,
) -> Vec<Action>
pub fn enter_script_mode( state: &mut CommandPanelState, command: &str, ) -> Vec<Action>
Enter script editing mode for a trace command
Sourcepub fn exit_script_mode(state: &mut CommandPanelState) -> Vec<Action>
pub fn exit_script_mode(state: &mut CommandPanelState) -> Vec<Action>
Exit script editing mode
Sourcepub fn submit_script(state: &mut CommandPanelState) -> Vec<Action>
pub fn submit_script(state: &mut CommandPanelState) -> Vec<Action>
Submit the current script
Sourcepub fn clear_script(state: &mut CommandPanelState) -> Vec<Action>
pub fn clear_script(state: &mut CommandPanelState) -> Vec<Action>
Clear the current script
Sourcepub fn insert_char(state: &mut CommandPanelState, c: char) -> Vec<Action>
pub fn insert_char(state: &mut CommandPanelState, c: char) -> Vec<Action>
Insert a character at the cursor position in script
Sourcepub fn insert_text(state: &mut CommandPanelState, text: &str) -> Vec<Action>
pub fn insert_text(state: &mut CommandPanelState, text: &str) -> Vec<Action>
Insert a string at the cursor position (supports newlines)
Sourcepub fn insert_newline(state: &mut CommandPanelState) -> Vec<Action>
pub fn insert_newline(state: &mut CommandPanelState) -> Vec<Action>
Insert a newline at the cursor position
Sourcepub fn insert_tab(state: &mut CommandPanelState) -> Vec<Action>
pub fn insert_tab(state: &mut CommandPanelState) -> Vec<Action>
Insert a tab (4 spaces) at the cursor position
Sourcepub fn delete_char(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_char(state: &mut CommandPanelState) -> Vec<Action>
Delete character before cursor in script
Sourcepub fn move_cursor_up(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_cursor_up(state: &mut CommandPanelState) -> Vec<Action>
Move cursor up in script
Sourcepub fn move_cursor_down(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_cursor_down(state: &mut CommandPanelState) -> Vec<Action>
Move cursor down in script
Sourcepub fn move_cursor_left(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_cursor_left(state: &mut CommandPanelState) -> Vec<Action>
Move cursor left in script
Sourcepub fn move_cursor_right(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_cursor_right(state: &mut CommandPanelState) -> Vec<Action>
Move cursor right in script
Sourcepub fn move_to_beginning(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_to_beginning(state: &mut CommandPanelState) -> Vec<Action>
Move cursor to beginning of line
Sourcepub fn move_to_end(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_to_end(state: &mut CommandPanelState) -> Vec<Action>
Move cursor to end of line
Sourcepub fn move_to_next_word(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_to_next_word(state: &mut CommandPanelState) -> Vec<Action>
Move cursor to next word (Ctrl+f)
Sourcepub fn move_to_previous_word(state: &mut CommandPanelState) -> Vec<Action>
pub fn move_to_previous_word(state: &mut CommandPanelState) -> Vec<Action>
Move cursor to previous word (Ctrl+b)
Sourcepub fn delete_previous_word(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_previous_word(state: &mut CommandPanelState) -> Vec<Action>
Delete previous word (Ctrl+w)
Sourcepub fn delete_to_end(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_to_end(state: &mut CommandPanelState) -> Vec<Action>
Delete from cursor to end of line
Sourcepub fn delete_to_line_start(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_to_line_start(state: &mut CommandPanelState) -> Vec<Action>
Delete from cursor to beginning of line (Ctrl+u)
Sourcepub fn delete_to_beginning(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_to_beginning(state: &mut CommandPanelState) -> Vec<Action>
Delete from cursor to beginning of line (legacy name for compatibility)
Sourcepub fn delete_char_at_cursor(state: &mut CommandPanelState) -> Vec<Action>
pub fn delete_char_at_cursor(state: &mut CommandPanelState) -> Vec<Action>
Delete character at cursor position (Ctrl+h - backspace)
Sourcepub fn can_edit_script(state: &CommandPanelState) -> bool
pub fn can_edit_script(state: &CommandPanelState) -> bool
Check if script editor can be re-entered
Sourcepub fn edit_script_again(state: &mut CommandPanelState) -> Vec<Action>
pub fn edit_script_again(state: &mut CommandPanelState) -> Vec<Action>
Re-enter script editing mode for last submitted script
Sourcepub fn format_script_display_with_config(
target: &str,
lines: &[String],
emoji_config: &EmojiConfig,
) -> String
pub fn format_script_display_with_config( target: &str, lines: &[String], emoji_config: &EmojiConfig, ) -> String
Format script for display with emoji configuration
Sourcepub fn format_trace_success_response(
target: &str,
details: Option<&TraceDetails>,
emoji_config: &EmojiConfig,
) -> String
pub fn format_trace_success_response( target: &str, details: Option<&TraceDetails>, emoji_config: &EmojiConfig, ) -> String
Format trace success response with detailed information
pub fn format_trace_success_response_with_script( target: &str, details: Option<&TraceDetails>, script_content: Option<&str>, emoji_config: &EmojiConfig, ) -> String
Sourcepub fn format_compilation_results(
compilation_details: &ScriptCompilationDetails,
script_content: Option<&str>,
emoji_config: &EmojiConfig,
) -> String
pub fn format_compilation_results( compilation_details: &ScriptCompilationDetails, script_content: Option<&str>, emoji_config: &EmojiConfig, ) -> String
Format compilation results with all successful and failed traces
Sourcepub fn format_trace_error_response(
target: &str,
error: &str,
details: Option<&TraceErrorDetails>,
emoji_config: &EmojiConfig,
) -> String
pub fn format_trace_error_response( target: &str, error: &str, details: Option<&TraceErrorDetails>, emoji_config: &EmojiConfig, ) -> String
Format trace error response with detailed information
pub fn format_trace_error_response_with_script( target: &str, error: &str, _details: Option<&TraceErrorDetails>, script_content: Option<&str>, emoji_config: &EmojiConfig, ) -> String
Auto Trait Implementations§
impl Freeze for ScriptEditor
impl RefUnwindSafe for ScriptEditor
impl Send for ScriptEditor
impl Sync for ScriptEditor
impl Unpin for ScriptEditor
impl UnwindSafe for ScriptEditor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more