pub enum WorkerMsg {
Git {
path: PathBuf,
state: Option<GitDirState>,
file_statuses: Vec<(String, GitFileStatus)>,
},
FsChanged {
path: PathBuf,
},
Preview {
generation: u64,
path: PathBuf,
content: PreviewContent,
truncated: bool,
is_text: Option<bool>,
},
ImageMeta {
generation: u64,
path: PathBuf,
content: PreviewContent,
},
TerminalOutput {
id: u64,
},
TerminalExited {
id: u64,
code: Option<u32>,
},
TransferProgress {
id: u64,
done: usize,
total: usize,
},
TransferDone {
report: TransferReport,
},
}Expand description
All messages that worker tasks can send back to the UI thread.
The single-enum design (one channel, one receiver) was decided in the
implementation plan’s Decision Log over per-domain channels, to keep the
event loop select! simple and avoid priority inversion.
Variants§
Git
Git repository state for path has been computed.
file_statuses maps entry filenames to their git status for the
current directory. Both fields are None when the path is not inside
a git repository.
Fields
state: Option<GitDirState>Repository-level state (branch, dirty flag); None outside a repo.
file_statuses: Vec<(String, GitFileStatus)>Per-file status map: filename → GitFileStatus.
FsChanged
The filesystem watcher detected a change in path after the debounce
window elapsed.
Preview
An async preview result is ready.
generation must match state.preview.generation or the message is
dropped by merge() — this is the generation-guard invariant.
The path this preview is for (additional staleness guard).
Fields
content: PreviewContentThe rendered content.
truncated: boolWhether the file continues past the loaded content, because the
worker stopped at [preview] max_lines.
is_text: Option<bool>Whether the worker found the file to be text, or None when it never
got far enough to tell.
Cached on the matching entry by merge even when the preview
itself is stale: it is a fact about the file, not about the selection,
and it is what spares the next preview of that entry a worker round
trip.
ImageMeta
Image metadata (dimensions, format) is ready.
Like Preview, guarded by generation.
Fields
content: PreviewContentThe rendered metadata content.
TerminalOutput
A terminal panel shell produced output.
Carries no data: the output is already in the session’s screen. At most one is in flight per session until the next frame is drawn.
TerminalExited
A terminal panel shell exited.
Fields
TransferProgress
A background copy or move finished another entry.
Fields
TransferDone
A background copy or move finished.
Fields
report: TransferReportWhat became of each entry.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerMsg
impl !UnwindSafe for WorkerMsg
impl Freeze for WorkerMsg
impl Send for WorkerMsg
impl Sync for WorkerMsg
impl Unpin for WorkerMsg
impl UnsafeUnpin for WorkerMsg
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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