pub struct SettingsScreen {
pub base_url: String,
pub download_dir: String,
pub use_https: bool,
pub auth_status: String,
pub version: String,
pub server_version: String,
pub github_url: String,
pub selected_index: usize,
pub editing: bool,
pub edit_buffer: String,
pub edit_cursor: usize,
pub message: Option<(String, Color)>,
}Expand description
Interactive settings screen for editing current config.
Fields§
§base_url: String§download_dir: String§use_https: bool§auth_status: String§version: String§server_version: String§github_url: String§selected_index: usize§editing: bool§edit_buffer: String§edit_cursor: usize§message: Option<(String, Color)>Implementations§
Source§impl SettingsScreen
impl SettingsScreen
pub fn new(config: &Config, romm_server_version: Option<&str>) -> Self
pub fn next(&mut self)
pub fn previous(&mut self)
pub fn enter_edit(&mut self)
pub fn save_edit(&mut self) -> bool
pub fn cancel_edit(&mut self)
pub fn add_char(&mut self, c: char)
pub fn delete_char(&mut self)
pub fn move_cursor_left(&mut self)
pub fn move_cursor_right(&mut self)
pub fn render(&self, f: &mut Frame<'_>, area: Rect)
pub fn cursor_position(&self, area: Rect) -> Option<(u16, u16)>
Auto Trait Implementations§
impl Freeze for SettingsScreen
impl RefUnwindSafe for SettingsScreen
impl Send for SettingsScreen
impl Sync for SettingsScreen
impl Unpin for SettingsScreen
impl UnsafeUnpin for SettingsScreen
impl UnwindSafe for SettingsScreen
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