pub struct DebugWidget { /* private fields */ }
Expand description
A self-contained debug widget that manages its own state and rendering
Implementations§
Source§impl DebugWidget
impl DebugWidget
pub fn new() -> Self
Sourcepub fn generate_debug(
&mut self,
buffer: &dyn BufferAPI,
buffer_count: usize,
buffer_index: usize,
buffer_names: Vec<String>,
hybrid_parser: &HybridParser,
sort_state: &SortState,
input_text: &str,
cursor_pos: usize,
visual_cursor: usize,
api_url: &str,
)
pub fn generate_debug( &mut self, buffer: &dyn BufferAPI, buffer_count: usize, buffer_index: usize, buffer_names: Vec<String>, hybrid_parser: &HybridParser, sort_state: &SortState, input_text: &str, cursor_pos: usize, visual_cursor: usize, api_url: &str, )
Generate and set debug content
Sourcepub fn generate_pretty_sql(&mut self, query: &str)
pub fn generate_pretty_sql(&mut self, query: &str)
Generate pretty formatted SQL
Sourcepub fn generate_test_case(&mut self, buffer: &dyn BufferAPI)
pub fn generate_test_case(&mut self, buffer: &dyn BufferAPI)
Generate test case content
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> bool
pub fn handle_key(&mut self, key: KeyEvent) -> bool
Handle key events for the debug widget
Sourcepub fn get_visible_lines(&self, height: usize) -> Vec<Line<'static>>
pub fn get_visible_lines(&self, height: usize) -> Vec<Line<'static>>
Get the visible lines based on scroll offset
Sourcepub fn scroll_down(&mut self, amount: u16)
pub fn scroll_down(&mut self, amount: u16)
Scroll down by the specified amount
Sourcepub fn scroll_to_top(&mut self)
pub fn scroll_to_top(&mut self)
Scroll to the top
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
Scroll to the bottom
Sourcepub fn get_content(&self) -> &str
pub fn get_content(&self) -> &str
Get the current content (for clipboard operations)
Sourcepub fn set_content(&mut self, content: String)
pub fn set_content(&mut self, content: String)
Set custom content
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebugWidget
impl RefUnwindSafe for DebugWidget
impl Send for DebugWidget
impl Sync for DebugWidget
impl Unpin for DebugWidget
impl UnwindSafe for DebugWidget
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
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>
Converts
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>
Converts
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