Skip to main content

AppMessage

Enum AppMessage 

Source
pub enum AppMessage {
    Input(KeyChord),
    Resize,
    Fs(FsEvent),
    Search(SearchEvent),
    Git(GitEvent),
    Lsp(LspServerId, LspEvent),
    Pty(PtyEvent),
    Agent(AgentEvent),
}
Expand description

A message from an off-loop producer to the single owner of application state.

Exhaustive on purpose: adding a producer should break every loop that has not decided what to do about it.

Variants§

§

Input(KeyChord)

A resolved key chord from the terminal input pump.

§

Resize

The terminal was resized. Ratatui re-measures on the next draw, so this carries no dimensions — it exists to wake the loop so that draw happens.

§

Fs(FsEvent)

A result from the filesystem worker: a directory listing, a failure, or a watch notification. The reason the loop can no longer block on the keyboard.

§

Search(SearchEvent)

A streamed workspace-search update.

§

Git(GitEvent)

A result from the serialized Git worker.

§

Lsp(LspServerId, LspEvent)

A language-server event tagged with the session that produced it.

§

Pty(PtyEvent)

Output or lifecycle state from the PTY worker.

§

Agent(AgentEvent)

Something the agent produced — streamed text, an edit proposal, a permission request.

The agent worker feeds this channel exactly as the filesystem worker does, so the scripted agent and the real ACP client reach the model through the same function. A fake that took a different path would be testing a route the product never uses.

Trait Implementations§

Source§

impl Clone for AppMessage

Source§

fn clone(&self) -> AppMessage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AppMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for AppMessage

Source§

impl PartialEq for AppMessage

Source§

fn eq(&self, other: &AppMessage) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AppMessage

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.