pub enum BackgroundResult {
RepoLoaded {
path: PathBuf,
result: Result<RepoPayload, String>,
},
FetchDone(Result<(), String>),
CommitDiffLoaded(Result<Vec<DiffInfo>, String>),
StagingRefreshed(Result<StagingPayload, String>),
OperationDone {
ok_message: Option<String>,
err_message: Option<String>,
needs_refresh: bool,
needs_staging_refresh: bool,
},
CommitFileListLoaded(Result<Vec<DiffFileEntry>, String>),
SingleFileDiffLoaded(Result<(usize, DiffInfo), String>),
SearchResults(Result<Vec<CommitInfo>, String>),
CommitRangeDiffLoaded(Result<Vec<DiffInfo>, String>),
FileHistoryLoaded {
path: String,
commits: Vec<CommitInfo>,
},
FileBlameLoaded {
path: String,
lines: Vec<BlameLine>,
},
GitStateChanged,
}Expand description
Results produced by background tasks and sent back to the main loop.
Variants§
RepoLoaded
A repo open / refresh completed. The PathBuf identifies which tab
initiated the load so the result is applied to the correct tab.
FetchDone(Result<(), String>)
A fetch completed.
CommitDiffLoaded(Result<Vec<DiffInfo>, String>)
A commit-diff load completed.
StagingRefreshed(Result<StagingPayload, String>)
A staging-only refresh completed (unstaged + staged diffs reloaded).
OperationDone
A single-shot operation (stage, unstage, checkout, commit, stash, etc.) completed and the staging area should be refreshed.
Fields
CommitFileListLoaded(Result<Vec<DiffFileEntry>, String>)
A commit file list (lightweight, no diff content) was loaded.
SingleFileDiffLoaded(Result<(usize, DiffInfo), String>)
A single file’s diff was loaded. The usize is the file index in commit_files.
SearchResults(Result<Vec<CommitInfo>, String>)
Commit search results loaded.
CommitRangeDiffLoaded(Result<Vec<DiffInfo>, String>)
Combined range diff across multiple selected commits.
FileHistoryLoaded
File history (commits touching a specific file) loaded.
FileBlameLoaded
File blame lines loaded.
GitStateChanged
The .git directory changed from outside the TUI — trigger a full refresh.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackgroundResult
impl RefUnwindSafe for BackgroundResult
impl Send for BackgroundResult
impl Sync for BackgroundResult
impl Unpin for BackgroundResult
impl UnsafeUnpin for BackgroundResult
impl UnwindSafe for BackgroundResult
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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