pub struct ContextTab {
pub section: usize,
pub edit: Option<EditState>,
}Fields§
§section: usize§edit: Option<EditState>Trait Implementations§
Source§impl Debug for ContextTab
impl Debug for ContextTab
Source§impl Default for ContextTab
impl Default for ContextTab
Source§impl Tab for ContextTab
impl Tab for ContextTab
Source§fn claims_key(&self, _key: &KeyEvent) -> bool
fn claims_key(&self, _key: &KeyEvent) -> bool
true when this tab wants key delivered to it before the
App’s global hotkeys (q, s, r, p, ?). Tabs return true
for character keys while a text field or a picker filter has focus,
so typing staging or force_push never opens a modal.Source§fn is_editing(&self) -> bool
fn is_editing(&self) -> bool
true while the tab is in an edit state (a drilled-in section, an
open text field, a picker). The App closes that state with Esc
when the user leaves the tab, so no hidden edit state stays open.fn title(&self) -> &str
fn render(&self, area: Rect, buf: &mut Buffer, draft: &DraftSettings)
fn handle_key(&mut self, key: KeyEvent, draft: &mut DraftSettings) -> TabOutcome
Source§fn current_focus(&self) -> FieldFocus
fn current_focus(&self) -> FieldFocus
Description of the currently focused field. Used by the App to
render the bottom strip on a freshly-opened tab.
Source§fn mode_badge(&self) -> Option<&'static str>
fn mode_badge(&self) -> Option<&'static str>
Returns Some(badge) for mode-specific tabs (AI / Wrap),
None for shared tabs.
Auto Trait Implementations§
impl Forget for ContextTab
impl Freeze for ContextTab
impl Move for ContextTab
impl RefUnwindSafe for ContextTab
impl Send for ContextTab
impl Sync for ContextTab
impl Unpin for ContextTab
impl UnsafeUnpin for ContextTab
impl UnwindSafe for ContextTab
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