pub struct App {Show 14 fields
pub should_quit: bool,
pub repo_info: Option<RepoInfo>,
pub selected_index: usize,
pub show_detail: bool,
pub input_mode: InputMode,
pub filter_text: String,
pub branches: Vec<String>,
pub branch_selected_index: usize,
pub file_statuses: Vec<FileStatus>,
pub status_selected_index: usize,
pub commit_message: String,
pub status_message: Option<String>,
pub is_loading: bool,
pub show_help: bool,
/* private fields */
}Expand description
アプリケーション状態
Fields§
§should_quit: boolアプリケーションが終了すべきかどうか
repo_info: Option<RepoInfo>リポジトリ情報
selected_index: usize選択中のイベントインデックス(filtered_indices内)
show_detail: bool詳細表示モード
input_mode: InputMode入力モード
filter_text: Stringフィルタ文字列
branches: Vec<String>ブランチ一覧
branch_selected_index: usizeブランチ選択インデックス
file_statuses: Vec<FileStatus>ファイルステータス一覧
status_selected_index: usizeステータス選択インデックス
commit_message: Stringコミットメッセージ
status_message: Option<String>ステータスメッセージ(操作結果表示用)
is_loading: boolバックグラウンド読み込み中フラグ
show_help: boolヘルプ表示フラグ
Implementations§
Source§impl App
impl App
pub fn new() -> Self
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
フィルタ後のイベント数を取得
Sourcepub fn move_to_top(&mut self)
pub fn move_to_top(&mut self)
先頭に移動 (gg)
Sourcepub fn move_to_bottom(&mut self)
pub fn move_to_bottom(&mut self)
末尾に移動 (G)
Sourcepub fn toggle_help(&mut self)
pub fn toggle_help(&mut self)
ヘルプ表示を切り替え
Sourcepub fn close_help(&mut self)
pub fn close_help(&mut self)
ヘルプを閉じる
Sourcepub fn selected_event(&self) -> Option<&GitEvent>
pub fn selected_event(&self) -> Option<&GitEvent>
選択中のイベントを取得
Sourcepub fn open_detail(&mut self)
pub fn open_detail(&mut self)
詳細表示を開く
Sourcepub fn close_detail(&mut self)
pub fn close_detail(&mut self)
詳細表示を閉じる
Sourcepub fn start_filter(&mut self)
pub fn start_filter(&mut self)
フィルタモードを開始
Sourcepub fn end_filter(&mut self)
pub fn end_filter(&mut self)
フィルタモードを終了
Sourcepub fn filter_push(&mut self, c: char)
pub fn filter_push(&mut self, c: char)
フィルタ文字を追加
Sourcepub fn filter_pop(&mut self)
pub fn filter_pop(&mut self)
フィルタ文字を削除
Sourcepub fn filter_clear(&mut self)
pub fn filter_clear(&mut self)
フィルタをクリア
Sourcepub fn branch_name(&self) -> &str
pub fn branch_name(&self) -> &str
ブランチ名を取得
Sourcepub fn start_branch_select(&mut self, branches: Vec<String>)
pub fn start_branch_select(&mut self, branches: Vec<String>)
ブランチ選択モードを開始
Sourcepub fn end_branch_select(&mut self)
pub fn end_branch_select(&mut self)
ブランチ選択モードを終了
Sourcepub fn branch_move_up(&mut self)
pub fn branch_move_up(&mut self)
ブランチ選択を上に移動
Sourcepub fn branch_move_down(&mut self)
pub fn branch_move_down(&mut self)
ブランチ選択を下に移動
Sourcepub fn selected_branch(&self) -> Option<&str>
pub fn selected_branch(&self) -> Option<&str>
選択中のブランチ名を取得
Sourcepub fn update_branch(&mut self, branch: String)
pub fn update_branch(&mut self, branch: String)
ブランチ切り替え後にリポジトリ情報を更新
Sourcepub fn all_events_replace(&mut self, events: Vec<GitEvent>)
pub fn all_events_replace(&mut self, events: Vec<GitEvent>)
イベント一覧を置き換え
Sourcepub fn filtered_indices_reset(&mut self, count: usize)
pub fn filtered_indices_reset(&mut self, count: usize)
フィルタインデックスをリセット
Sourcepub fn start_status_view(&mut self, statuses: Vec<FileStatus>)
pub fn start_status_view(&mut self, statuses: Vec<FileStatus>)
ステータスビューモードを開始
Sourcepub fn end_status_view(&mut self)
pub fn end_status_view(&mut self)
ステータスビューモードを終了
Sourcepub fn status_move_up(&mut self)
pub fn status_move_up(&mut self)
ステータス選択を上に移動
Sourcepub fn status_move_down(&mut self)
pub fn status_move_down(&mut self)
ステータス選択を下に移動
Sourcepub fn selected_file_status(&self) -> Option<&FileStatus>
pub fn selected_file_status(&self) -> Option<&FileStatus>
選択中のファイルステータスを取得
Sourcepub fn update_file_statuses(&mut self, statuses: Vec<FileStatus>)
pub fn update_file_statuses(&mut self, statuses: Vec<FileStatus>)
ファイルステータス一覧を更新
Sourcepub fn set_status_message(&mut self, msg: String)
pub fn set_status_message(&mut self, msg: String)
ステータスメッセージを設定
Sourcepub fn start_commit_input(&mut self)
pub fn start_commit_input(&mut self)
コミット入力モードを開始
Sourcepub fn end_commit_input(&mut self)
pub fn end_commit_input(&mut self)
コミット入力モードを終了
Sourcepub fn commit_message_push(&mut self, c: char)
pub fn commit_message_push(&mut self, c: char)
コミットメッセージに文字を追加
Sourcepub fn commit_message_pop(&mut self)
pub fn commit_message_pop(&mut self)
コミットメッセージから文字を削除
Sourcepub fn commit_message_clear(&mut self)
pub fn commit_message_clear(&mut self)
コミットメッセージをクリア
Sourcepub fn file_status_count(&self) -> usize
pub fn file_status_count(&self) -> usize
ファイルステータス数を取得
Sourcepub fn start_loading(&mut self)
pub fn start_loading(&mut self)
読み込み中状態を開始
Sourcepub fn finish_loading(&mut self)
pub fn finish_loading(&mut self)
読み込み中状態を終了
Sourcepub fn append_events(&mut self, events: Vec<GitEvent>)
pub fn append_events(&mut self, events: Vec<GitEvent>)
イベントを追加(バックグラウンド読み込み用)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe 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
Mutably borrows from an owned value. Read more
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