Skip to main content

Payload

Trait Payload 

Source
pub trait Payload:
    Send
    + Sync
    + Debug
    + 'static { }
Expand description

SRD-92 / ExecUnification — the opaque return payload a unit may carry on its Outcome, above the leaf-projection boundary.

A scaffold-owned marker (no methods yet — the loop/poll read-path is a later step): the op leaf fills it, aggregates leave it None. Kept neutral (not the adapter’s crate::adapter::ResultBody) so the universal return type does not depend on the adapter result trait, and a future aggregate fold-summary can implement Payload honestly without faking row-count methods. Send + Sync + 'static keeps Outcome spawn / ArcSwap / Mutex safe; Debug keeps Outcome’s derive working.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: ?Sized + ResultBody + 'static> Payload for T

Every adapter crate::adapter::ResultBody is a Payload. A blanket impl (not a subtrait) so it covers ResultBody impls in the adapter crates and tests too with zero cross-crate churn — the impl lives here, where Payload is defined. A neutral fold-summary type may still impl Payload directly (no overlap, since it is not a ResultBody). Trade-off: a blanket gives no dyn-upcasting, so Step 2 lifts the erased Box<dyn ResultBody> via a thin wrapper rather than an Arc<dyn ResultBody> -> Arc<dyn Payload> coercion.