Skip to main content

App

Struct App 

Source
pub struct App {
    pub mode: CleanupMode,
    pub remote: String,
    pub group_name: String,
    pub group_description: String,
    pub step_index: usize,
    pub step_count: usize,
    pub branches: Vec<Branch>,
    pub selected: usize,
    pub screen: AppScreen,
    pub modal: Option<Modal>,
}

Fields§

§mode: CleanupMode§remote: String§group_name: String§group_description: String§step_index: usize§step_count: usize§branches: Vec<Branch>§selected: usize§screen: AppScreen§modal: Option<Modal>

Implementations§

Source§

impl App

Source

pub fn from_group( group: CleanupGroup, remote: impl Into<String>, step_index: usize, step_count: usize, ) -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn next(&mut self)

Source

pub fn previous(&mut self)

Source

pub fn toggle_delete(&mut self)

Source

pub fn toggle_save(&mut self)

Source

pub fn mark_all_delete(&mut self)

Source

pub fn unmark_all(&mut self)

Source

pub fn delete_candidates(&self) -> Vec<&Branch>

Source

pub fn deletable_branches(&self) -> Vec<&Branch>

Source

pub fn delete_count(&self) -> usize

Source

pub fn saved_branch_names(&self) -> Vec<String>

Source

pub fn dismiss_modal(&mut self)

Source

pub fn in_triage(&self) -> bool

Source

pub fn review_items(&self) -> Option<&[CommandPlanItem]>

Source

pub fn review_requires_explicit_choice(&self) -> bool

Source

pub fn execution_items(&self) -> Option<&[CommandPlanItem]>

Source

pub fn execution_failure(&self) -> Option<&ExecutionFailure>

Source

pub fn execution_running_index(&self) -> Option<usize>

Source

pub fn execution_spinner_frame(&self) -> usize

Source

pub fn enter_review(&mut self) -> bool

Source

pub fn exit_review(&mut self)

Source

pub fn require_review_confirmation(&mut self)

Source

pub fn begin_execution(&mut self)

Source

pub fn next_pending_execution_index(&self) -> Option<usize>

Source

pub fn execution_branch(&self, index: usize) -> Option<&Branch>

Source

pub fn mark_execution_result(&mut self, index: usize, success: bool)

Source

pub fn mark_execution_skipped_from(&mut self, start: usize)

Source

pub fn set_execution_failure(&mut self, index: usize, output: impl Into<String>)

Source

pub fn start_execution(&mut self, index: usize)

Source

pub fn advance_execution_spinner(&mut self)

Trait Implementations§

Source§

impl Clone for App

Source§

fn clone(&self) -> App

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for App

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for App

§

impl RefUnwindSafe for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

§

impl UnwindSafe for App

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<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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.