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<DiffInfo, String>),
SearchResults(Result<Vec<CommitInfo>, String>),
}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<DiffInfo, String>)
A single file’s diff was loaded.
SearchResults(Result<Vec<CommitInfo>, String>)
Commit search results loaded.
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
Mutably borrows from an owned value. Read more
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>
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