pub struct ResponseFormatter;Expand description
Handles response formatting and display for the command panel
Implementations§
Source§impl ResponseFormatter
impl ResponseFormatter
Sourcepub fn style_generic_message_lines(text: &str) -> Vec<Line<'static>>
pub fn style_generic_message_lines(text: &str) -> Vec<Line<'static>>
Create enhanced styled lines for generic messages.
- Leading symbols: ✓ (success), ✗ (error), ⚠ (warning)
- Numbers/hex addresses: Yellow
- Keywords (trace/function/line/file/pid/pc/enabled/disabled/deleted/saved/loaded): Cyan
- Error tokens (failed/error/unknown/not/found/cannot/missing): Red
Sourcepub fn add_response_with_style(
state: &mut CommandPanelState,
content: String,
styled_lines: Option<Vec<Line<'static>>>,
response_type: ResponseType,
)
pub fn add_response_with_style( state: &mut CommandPanelState, content: String, styled_lines: Option<Vec<Line<'static>>>, response_type: ResponseType, )
Add a response with pre-styled lines (preferred when available)
Sourcepub fn add_simple_styled_response(
state: &mut CommandPanelState,
content: String,
style: Style,
response_type: ResponseType,
)
pub fn add_simple_styled_response( state: &mut CommandPanelState, content: String, style: Style, response_type: ResponseType, )
Helper method to create a simple single-line styled response This reduces code duplication for common response patterns
Sourcepub fn format_batch_load_summary_styled(
filename: &str,
total_count: usize,
success_count: usize,
failed_count: usize,
disabled_count: usize,
details: &[TraceLoadDetail],
) -> Vec<Line<'static>>
pub fn format_batch_load_summary_styled( filename: &str, total_count: usize, success_count: usize, failed_count: usize, disabled_count: usize, details: &[TraceLoadDetail], ) -> Vec<Line<'static>>
Format styled lines for batch trace loading summary This reduces code duplication in app.rs for source command responses
Sourcepub fn update_static_lines(state: &mut CommandPanelState)
pub fn update_static_lines(state: &mut CommandPanelState)
Update the static lines display from command history
Sourcepub fn format_line_for_display(
state: &CommandPanelState,
line: &StaticTextLine,
is_current_input: bool,
width: usize,
) -> Vec<Line<'static>>
pub fn format_line_for_display( state: &CommandPanelState, line: &StaticTextLine, is_current_input: bool, width: usize, ) -> Vec<Line<'static>>
Format a line for display with proper styling
Sourcepub fn format_file_info(groups: &[SourceFileGroup], use_ascii: bool) -> String
pub fn format_file_info(groups: &[SourceFileGroup], use_ascii: bool) -> String
Format file information display
Sourcepub fn format_file_info_styled(
groups: &[SourceFileGroup],
use_ascii: bool,
) -> Vec<Line<'static>>
pub fn format_file_info_styled( groups: &[SourceFileGroup], use_ascii: bool, ) -> Vec<Line<'static>>
Styled: Format file information display
Format shared library information
Sourcepub fn format_executable_file_info(
info: &ExecutableFileInfoDisplay<'_>,
) -> String
pub fn format_executable_file_info( info: &ExecutableFileInfoDisplay<'_>, ) -> String
Format executable file information for display
Styled shared library information (new)
Sourcepub fn format_executable_file_info_styled(
info: &ExecutableFileInfoDisplay<'_>,
) -> Vec<Line<'static>>
pub fn format_executable_file_info_styled( info: &ExecutableFileInfoDisplay<'_>, ) -> Vec<Line<'static>>
Styled executable file information (new)
Sourcepub fn render_panel(f: &mut Frame<'_>, area: Rect, state: &CommandPanelState)
pub fn render_panel(f: &mut Frame<'_>, area: Rect, state: &CommandPanelState)
Render the command panel content
Auto Trait Implementations§
impl Freeze for ResponseFormatter
impl RefUnwindSafe for ResponseFormatter
impl Send for ResponseFormatter
impl Sync for ResponseFormatter
impl Unpin for ResponseFormatter
impl UnwindSafe for ResponseFormatter
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