pub trait PyOutputSpec {
type Output<'m>: CuMsgPayload
where Self: 'm;
type Owned: Clone + Serialize + DeserializeOwned;
// Required methods
fn to_owned(output: &Self::Output<'_>) -> Self::Owned;
fn replace_output(output: &mut Self::Output<'_>, owned: Self::Owned);
}Expand description
Describes how a Python-backed task exposes Copper outputs.
Outputs are converted into mutable owned values before calling Python, then written back into Copper message slots after the Python function returns.
Required Associated Types§
type Output<'m>: CuMsgPayload where Self: 'm
type Owned: Clone + Serialize + DeserializeOwned
Required Methods§
fn to_owned(output: &Self::Output<'_>) -> Self::Owned
fn replace_output(output: &mut Self::Output<'_>, owned: Self::Owned)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.