Skip to main content

StreamNodeResult

Enum StreamNodeResult 

Source
pub enum StreamNodeResult {
    Continue {
        deltas: Vec<StateDelta>,
        next: NextStep,
        span_id: SpanId,
        observed: Option<ObservedError>,
        metadata: Option<NodeMetadata>,
    },
    Pause {
        deltas: Vec<StateDelta>,
        barrier_id: BarrierId,
        node_name: String,
        span_id: SpanId,
        timeout: Option<Duration>,
        default_action: BarrierDefaultAction,
    },
    Fallback {
        deltas: Vec<StateDelta>,
        reason: String,
        node_name: String,
    },
}
Expand description

节点流式执行结果。

Variants§

§

Continue

节点正常完成(统一 Done + Observed)

Fields

§deltas: Vec<StateDelta>

状态增量

§next: NextStep

下一步

§span_id: SpanId

执行实例 ID

§observed: Option<ObservedError>

可选的观测错误(不影响 control flow)

§metadata: Option<NodeMetadata>

节点元数据(可选 — 用于 Adaptive Checkpoint 等)

§

Pause

Barrier 暂停,等待外部决策

Fields

§deltas: Vec<StateDelta>

状态增量(Barrier 进入等待前的修改)

§barrier_id: BarrierId

Barrier 审批请求 ID

§node_name: String

节点名称

§span_id: SpanId

执行实例 ID

§timeout: Option<Duration>

超时时间(None = 无限等待)

§default_action: BarrierDefaultAction

超时默认行为

§

Fallback

节点主动声明走备用路径(控制流,非错误)。

GraphError::Terminal 不同:Fallback 是节点主动声明的降级策略, executor 根据 fallback 边路由到备用节点。

Fields

§deltas: Vec<StateDelta>

状态增量(Fallback 前的修改)

§reason: String

降级原因

§node_name: String

节点名称

Trait Implementations§

Source§

impl Debug for StreamNodeResult

Source§

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

Formats the value using the given formatter. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more