pub struct App {Show 13 fields
pub pane: Pane,
pub detail_tab: DetailTab,
pub focus: Focus,
pub rows: Vec<BoardRow>,
pub selected: usize,
pub project: Option<String>,
pub projects: Vec<String>,
pub detail: Option<IssueDetail>,
pub detail_body: String,
pub prompt: Option<(PromptKind, String)>,
pub confirm: Option<ConfirmKind>,
pub help: bool,
pub clipboard: String,
/* private fields */
}Expand description
Interactive board. Talks only to BoardBackend.
Fields§
§pane: PaneActive list pane.
detail_tab: DetailTabDetail pane tab (show / excerpt / tree / related).
focus: FocusWhether keys target the row list or the detail pane.
rows: Vec<BoardRow>Rows for the current pane.
selected: usizeIndex into Self::rows.
project: Option<String>Project filter, if any.
projects: Vec<String>Known project names for the p prompt.
detail: Option<IssueDetail>Last loaded issue detail, if any.
detail_body: StringText drawn in the detail pane.
prompt: Option<(PromptKind, String)>Open line prompt and its buffer.
confirm: Option<ConfirmKind>Pending DONE/CANCELLED confirmation.
help: boolHelp overlay is visible.
clipboard: StringLast id copied with y.
Implementations§
Source§impl App
impl App
Sourcepub fn open_core(layout: Layout, agent: String) -> Result<Self, Error>
pub fn open_core(layout: Layout, agent: String) -> Result<Self, Error>
Open a file-backed board and load the Ready pane.
§Errors
Returns an error if the vault cannot be parsed or the first pane cannot be loaded.
Sourcepub fn with_backend(
backend: Box<dyn BoardBackend>,
agent: String,
status: ServeStatus,
) -> Result<Self, Error>
pub fn with_backend( backend: Box<dyn BoardBackend>, agent: String, status: ServeStatus, ) -> Result<Self, Error>
Build a board around an existing backend and load the Ready pane.
§Errors
Returns an error if the first pane cannot be loaded.
Sourcepub fn serve_status(&self) -> ServeStatus
pub fn serve_status(&self) -> ServeStatus
How the status line labels the current store.
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
Catalog generation from the current backend.
Sourcepub fn selected_id(&self) -> Option<&str>
pub fn selected_id(&self) -> Option<&str>
Id of the selected row, if the pane is not empty.
Sourcepub fn selected_state(&self) -> Option<&str>
pub fn selected_state(&self) -> Option<&str>
Org state of the selected row, if the pane is not empty.
Sourcepub fn backend(&self) -> &dyn BoardBackend
pub fn backend(&self) -> &dyn BoardBackend
The store this board is talking to.
Sourcepub fn replace_backend(
&mut self,
backend: Box<dyn BoardBackend>,
status: ServeStatus,
)
pub fn replace_backend( &mut self, backend: Box<dyn BoardBackend>, status: ServeStatus, )
Swap the store and adopt its identity. Does not reload rows.
Sourcepub fn attach(
&mut self,
socket: &Path,
offline: bool,
hooks: &AttachHooks,
) -> Result<(), Error>
pub fn attach( &mut self, socket: &Path, offline: bool, hooks: &AttachHooks, ) -> Result<(), Error>
Post-paint attach. --offline never probes the socket.
§Errors
Returns an error if the pane cannot be reloaded after the attach attempt.
Sourcepub fn status_line(&self) -> String
pub fn status_line(&self) -> String
One-line serve: / gen / rev / agent / project / message summary.
Sourcepub fn reload(&mut self) -> Result<(), Error>
pub fn reload(&mut self) -> Result<(), Error>
Fetch the current pane from the backend and refresh detail.
§Errors
Returns an error if the backend cannot load the pane.
Sourcepub fn poll_updates(&mut self)
pub fn poll_updates(&mut self)
Wait briefly for a catalog change and reload when the watermark moves.
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> Action
pub fn handle_key(&mut self, key: KeyEvent) -> Action
Dispatch one key. Repeat and press count; release is ignored.
Sourcepub fn prompt_line(&self) -> Option<String>
pub fn prompt_line(&self) -> Option<String>
Label and buffer for the open prompt, if any.
Sourcepub fn confirm_line(&self) -> Option<String>
pub fn confirm_line(&self) -> Option<String>
Confirmation line for DONE/CANCELLED, if any.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for App
impl !UnwindSafe for App
impl Freeze for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
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
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> ⓘ
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> ⓘ
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