Skip to main content

PollOutcome

Enum PollOutcome 

Source
pub enum PollOutcome {
    Pending {
        latest_assembly: Option<Vec<u8>>,
        progress: Option<f32>,
        stage: Option<String>,
        score: Option<ScoreReport>,
    },
    Checkpoint {
        latest_assembly: Option<Vec<u8>>,
        progress: Option<f32>,
        stage: Option<String>,
        score: Option<ScoreReport>,
    },
    Cancelled {
        assembly: Vec<u8>,
        score: Option<ScoreReport>,
    },
    Final {
        assembly: Vec<u8>,
        score: Option<ScoreReport>,
    },
    Error {
        code: String,
        message: String,
        details: HashMap<String, String>,
    },
}
Expand description

Outcome of a PollStream call. Native-Rust mirror of proto::plugin::PollStreamResponse’s oneof.

Variants§

§

Pending

Stream still running. latest_assembly is the working state at poll time; not authoritative until promoted on Final / Cancelled.

Fields

§latest_assembly: Option<Vec<u8>>

Working assembly snapshot, if the plugin emits one.

§progress: Option<f32>

Progress fraction in [0.0, 1.0], if the plugin tracks it.

§stage: Option<String>

Human-readable stage label, if provided.

§score: Option<ScoreReport>

Warm score of latest_assembly, if the plugin scores it.

§

Checkpoint

Accepted intermediate the host should commit into canonical state while the stream keeps running. Same payload as Pending, but the host commits it rather than treating it as a discardable preview; unlike a terminal it does not end the op (more checkpoints or a terminal follow), so the poll loop keeps going.

Fields

§latest_assembly: Option<Vec<u8>>

Working assembly snapshot, if the plugin emits one.

§progress: Option<f32>

Progress fraction in [0.0, 1.0], if the plugin tracks it.

§stage: Option<String>

Human-readable stage label, if provided.

§score: Option<ScoreReport>

Warm score of latest_assembly, if the plugin scores it.

§

Cancelled

Stream stopped at host request (the host sent CancelStream and the plugin returned its working pose). Same downstream handling as Final: the orchestrator promotes assembly into canonical state. Distinguished from Final only so the host can tell “the algorithm reached its endpoint” from “the user asked it to stop”; for open-ended ops (wiggle, shake) this IS the success terminal.

Fields

§assembly: Vec<u8>

Working assembly bytes for the orchestrator to promote.

§score: Option<ScoreReport>

Warm score of assembly, if the plugin scores it.

§

Final

Stream finished successfully. assembly is the definitive output the orchestrator promotes into canonical state.

Fields

§assembly: Vec<u8>

Definitive assembly bytes for the orchestrator to promote.

§score: Option<ScoreReport>

Warm score of assembly, if the plugin scores it.

§

Error

Op-level failure. Distinct from a transport-level error.

Fields

§code: String

Machine-readable error code (e.g. "STREAM_INTERNAL").

§message: String

Human-readable error message.

§details: HashMap<String, String>

Optional structured detail map.

Trait Implementations§

Source§

impl Clone for PollOutcome

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 PollOutcome

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

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.