pub struct ConfigTab {
pub entries: Vec<(String, ConfigCell)>,
pub selected: usize,
}Fields§
§entries: Vec<(String, ConfigCell)>§selected: usizeImplementations§
Source§impl ConfigTab
impl ConfigTab
pub fn new() -> Self
Sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
All entries are Unset — used to decide whether ensure_tab_loaded
should issue fetches.
Sourcepub fn set_loading(&mut self, key: &str, id: i64)
pub fn set_loading(&mut self, key: &str, id: i64)
Mark the entry for key as Loading.
Sourcepub fn on_reply(&mut self, key: &str, wire: &str)
pub fn on_reply(&mut self, key: &str, wire: &str)
Process a routed reply for key.
A server error maps to Unset (key not set); an envelope or parse
error maps to Error; a successful reply extracts :config-value.
Sourcepub fn any_loading(&self) -> bool
pub fn any_loading(&self) -> bool
Whether any entry is still waiting for a reply.
Sourcepub fn selected_key(&self) -> Option<&str>
pub fn selected_key(&self) -> Option<&str>
Key name at the selected row.
Sourcepub fn selected_value(&self) -> &str
pub fn selected_value(&self) -> &str
Current display value at the selected row; empty string if not loaded.
pub fn select_next(&mut self)
pub fn select_prev(&mut self)
pub fn draw(&self, frame: &mut Frame<'_>, area: Rect)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigTab
impl RefUnwindSafe for ConfigTab
impl Send for ConfigTab
impl Sync for ConfigTab
impl Unpin for ConfigTab
impl UnsafeUnpin for ConfigTab
impl UnwindSafe for ConfigTab
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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