pub struct ResultScreen {
pub raw: Value,
pub highlighted_lines: Vec<Line<'static>>,
pub scroll: usize,
pub scrollbar_state: ScrollbarState,
pub view_mode: ResultViewMode,
pub table_selected: usize,
pub table_row_count: usize,
pub message: Option<String>,
}Fields§
§raw: Value§highlighted_lines: Vec<Line<'static>>§scroll: usize§scrollbar_state: ScrollbarState§view_mode: ResultViewMode§table_selected: usize§table_row_count: usize§message: Option<String>Implementations§
Source§impl ResultScreen
impl ResultScreen
Sourcepub fn new(
result: Value,
endpoint_method: Option<&str>,
endpoint_path: Option<&str>,
) -> Self
pub fn new( result: Value, endpoint_method: Option<&str>, endpoint_path: Option<&str>, ) -> Self
Create a result screen. If endpoint_method is “GET” and endpoint_path is “/api/roms”
and the response has list items, table view is used as default.
pub fn collect_image_urls(value: &Value) -> Vec<String>
Sourcepub fn get_selected_item_value(&self) -> Option<Value>
pub fn get_selected_item_value(&self) -> Option<Value>
Returns the selected row value when in table view (for opening detail screen).
pub fn scroll_down(&mut self, amount: usize)
pub fn scroll_up(&mut self, amount: usize)
pub fn table_next(&mut self)
pub fn table_previous(&mut self)
pub fn table_page_up(&mut self)
pub fn table_page_down(&mut self)
pub fn switch_view_mode(&mut self)
pub fn clear_message(&mut self)
pub fn render(&self, f: &mut Frame<'_>, area: Rect)
Auto Trait Implementations§
impl Freeze for ResultScreen
impl RefUnwindSafe for ResultScreen
impl Send for ResultScreen
impl Sync for ResultScreen
impl Unpin for ResultScreen
impl UnsafeUnpin for ResultScreen
impl UnwindSafe for ResultScreen
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