Skip to main content

FormFocus

Enum FormFocus 

Source
pub enum FormFocus {
    Title,
    Status,
    Priority,
    Labels,
    Assignee,
    Estimate,
    Cycles,
    Milestones,
    Reviewer,
    StartDate,
    DueDate,
    Parent,
}

Variants§

§

Title

§

Status

§

Priority

§

Labels

§

Assignee

§

Estimate

§

Cycles

§

Milestones

§

Reviewer

§

StartDate

§

DueDate

§

Parent

The parent issue (WP06 / T026). Appended last, not slotted next to Assignee where it would read better: every existing row’s index is the identity of that row in render_with_bindings’s fields array, and inserting in the middle renumbers all five rows after it. Appending keeps the eleven existing indices stable, so no render or golden assertion moves.

Implementations§

Source§

impl FormFocus

Source

pub const RING: [FormFocus; 12]

The focus ring, in next() order, starting at Title.

One list, so render_with_bindings can derive both the focus index and the row labels from it. It used to hold a hand-written match for the index beside a positional array of labels, which agree only by inspection — and the two disagree silently, as a bold cursor on the wrong row.

Source

pub fn next(self) -> Self

Source

pub fn prev(self) -> Self

Source

pub fn label(self) -> &'static str

Source

pub fn index(self) -> usize

This field’s row in FormFocus::RING.

Source

pub fn is_date(self) -> bool

Whether this field holds a date (picker-only, no free typing).

Source

pub fn is_parent(self) -> bool

Whether this field holds a parent (picker-only, single-select).

Source

pub fn is_picker_only(self) -> bool

Whether the field’s value is chosen from a picker rather than typed.

Typing is refused on these, because a half-typed number or a hand-typed title is not a value: the service validates a parent by resolved number, so free text here could only ever fail. This is the general form of what is_date was already doing for dates alone.

Trait Implementations§

Source§

impl Clone for FormFocus

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FormFocus

Source§

impl Debug for FormFocus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FormFocus

Source§

impl PartialEq for FormFocus

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FormFocus

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.