Skip to main content

Frame

Enum Frame 

Source
pub enum Frame {
    Ready {
        pid: u32,
        version: String,
        epoch: String,
    },
    Snapshot {
        state: Box<State>,
    },
    Record {
        record: Box<Record>,
    },
    Messages {
        messages: Vec<BusMessage>,
        timed_out: bool,
    },
    Diff {
        session: SessionId,
        branch: Option<String>,
        cwd: String,
        diff: String,
    },
    Worktrees {
        worktrees: Vec<WorktreeInfo>,
    },
    PermissionDecision {
        decision: Decision,
    },
    QuestionAnswer {
        answers: Vec<String>,
    },
    Ok {
        note: Option<String>,
    },
    Error {
        message: String,
    },
    Models {
        kind: String,
        models: Vec<ModelInfo>,
        problem: Option<String>,
    },
}
Expand description

daemon → client。

Variants§

§

Ready

連線建立。

Fields

§pid: u32
§version: String
§epoch: String

daemon 啟動世代 id;log 被換掉或刪除時 client 可據此丟棄本地狀態。

§

Snapshot

完整狀態 (初次連線或要求 Snapshot 時)。

Fields

§state: Box<State>
§

Record

單一事件。

Fields

§record: Box<Record>
§

Messages

收件匣或等待結果。

Fields

§messages: Vec<BusMessage>
§timed_out: bool
§

Diff

某個 session 工作區的 git diff。

Fields

§session: SessionId
§branch: Option<String>
§diff: String
§

Worktrees

所有受管 worktree 清單。

Fields

§worktrees: Vec<WorktreeInfo>
§

PermissionDecision

核准決策回覆 (給 MCP ertangle_approve 或 client)。

Fields

§decision: Decision
§

QuestionAnswer

Interactive question answer (for MCP ertangle_question or a client).

Fields

§answers: Vec<String>
§

Ok

操作成功 (可帶說明)。

Fields

§

Error

Fields

§message: String
§

Models

ListModels 的回覆:id 為空字串代表「依設定檔預設」。

Fields

§kind: String
§models: Vec<ModelInfo>
§problem: Option<String>

查詢 CLI 時遇到的問題 (例如尚未登入);有值時清單可能不完整。

Implementations§

Source§

impl Frame

Source

pub fn ok() -> Self

Source

pub fn ok_note(note: impl Into<String>) -> Self

Source

pub fn error(message: impl Into<String>) -> Self

Trait Implementations§

Source§

impl Clone for Frame

Source§

fn clone(&self) -> Self

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 Frame

Source§

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

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

impl<'de> Deserialize<'de> for Frame

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Frame

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.