pub struct AppState {
pub repo_path: PathBuf,
pub project_name: String,
pub error: Option<String>,
pub view: AppView,
pub view_stack: Vec<AppView>,
pub layout_dimensions: LayoutDimensions,
pub educational_content_provider: EducationalContent,
pub tx: Option<Sender<Message>>,
pub effects: Vec<Command>,
pub fs_watcher: Option<RecommendedWatcher>,
pub reduced_motion: bool,
pub last_terminal_size: Option<Size>,
}
Fields§
§repo_path: PathBuf
§project_name: String
§error: Option<String>
§view: AppView
§view_stack: Vec<AppView>
§layout_dimensions: LayoutDimensions
§educational_content_provider: EducationalContent
§tx: Option<Sender<Message>>
§effects: Vec<Command>
§fs_watcher: Option<RecommendedWatcher>
§reduced_motion: bool
§last_terminal_size: Option<Size>
Implementations§
Source§impl AppState
impl AppState
pub fn new(repo_path: PathBuf) -> Self
pub fn push_view(&mut self, new_view: AppView)
pub fn pop_view(&mut self) -> bool
pub fn update_layout_dimensions(&mut self, terminal_size: Size)
pub fn is_wide_screen(&self) -> bool
pub fn check_terminal_resize(&mut self, current_size: Size) -> bool
pub fn has_active_animations(&self) -> bool
Source§impl AppState
impl AppState
pub fn handle_loose_object_view_mode_message(&mut self, msg: Message) -> bool
Source§impl AppState
impl AppState
pub fn handle_main_view_mode_message( &mut self, msg: Message, plumber: &GitPlumber, ) -> bool
Source§impl AppState
impl AppState
pub fn load_git_objects(&mut self, plumber: &GitPlumber) -> Message
pub fn load_git_object_details(&self, _plumber: &GitPlumber) -> Message
pub fn load_educational_content(&self, _plumber: &GitPlumber) -> Message
pub fn load_pack_objects(&mut self, pack_path: &PathBuf) -> Message
Source§impl AppState
impl AppState
pub fn load_pack_objects_if_needed(&mut self, _plumber: &GitPlumber)
Source§impl AppState
impl AppState
pub fn update_git_objects_scroll_for_selection(&mut self, new_index: usize)
Source§impl AppState
impl AppState
pub fn handle_load_result_message( &mut self, msg: Message, plumber: &GitPlumber, ) -> bool
pub fn update(&mut self, msg: Message, plumber: &GitPlumber) -> bool
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnwindSafe for AppState
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