pub struct EpicViewState {
pub selected: usize,
pub member: usize,
}Expand description
The TUI epic view’s cursor state (WP04 T020, FR-003/FR-004/FR-005).
A cursor over the epics, and a second into the selected epic’s member list. The
member list is the direct issue navigation surface: Self::target_member
names the issue Enter opens, so a user reaches an issue’s own detail pane from
here rather than only through the epic layer (FR-004).
Fields§
§selected: usizeCursor into the epic list, in the service’s declaration order.
member: usizeCursor into the selected epic’s member list.
Implementations§
Source§impl EpicViewState
impl EpicViewState
pub fn new() -> Self
Sourcepub fn move_selected(&mut self, delta: isize, len: usize)
pub fn move_selected(&mut self, delta: isize, len: usize)
Move the epic cursor, clamped to len; the member cursor resets, because it
indexes the newly selected epic’s own list.
Sourcepub fn move_member(&mut self, delta: isize, len: usize)
pub fn move_member(&mut self, delta: isize, len: usize)
Move the member cursor, clamped to the selected epic’s member len.
Sourcepub fn target_member(&self, entries: &[EpicViewEntry]) -> Option<u32>
pub fn target_member(&self, entries: &[EpicViewEntry]) -> Option<u32>
The member issue Enter opens, when the selected epic has one (FR-004).
None for an empty view or an epic with no members, so the key is inert rather
than opening an arbitrary issue.
Sourcepub fn render(&self, f: &mut Frame<'_>, area: Rect, entries: &[EpicViewEntry])
pub fn render(&self, f: &mut Frame<'_>, area: Rect, entries: &[EpicViewEntry])
Render the epic view over area.
The body is the pure epic_lines, so the content is pinned by a unit test
rather than by a TTY-bound draw; this method only adds the frame and the
navigation affordance.
Trait Implementations§
Source§impl Clone for EpicViewState
impl Clone for EpicViewState
Source§impl Debug for EpicViewState
impl Debug for EpicViewState
Source§impl Default for EpicViewState
impl Default for EpicViewState
impl Eq for EpicViewState
Source§impl PartialEq for EpicViewState
impl PartialEq for EpicViewState
impl StructuralPartialEq for EpicViewState
Auto Trait Implementations§
impl Freeze for EpicViewState
impl RefUnwindSafe for EpicViewState
impl Send for EpicViewState
impl Sync for EpicViewState
impl Unpin for EpicViewState
impl UnsafeUnpin for EpicViewState
impl UnwindSafe for EpicViewState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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