Skip to main content

PyInputSpec

Trait PyInputSpec 

Source
pub trait PyInputSpec {
    type Input<'m>: CuMsgPack
       where Self: 'm;
    type Owned: Clone + Serialize + DeserializeOwned;

    // Required method
    fn to_owned(input: &Self::Input<'_>) -> Self::Owned;
}
Expand description

Describes how a Python-backed task receives its Copper inputs.

Python cannot safely borrow Copper messages directly, so every call converts the runtime input into an owned representation first.

Required Associated Types§

Required Methods§

Source

fn to_owned(input: &Self::Input<'_>) -> Self::Owned

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl PyInputSpec for ()

Source§

type Input<'m> = () where Self: 'm

Source§

type Owned = ()

Source§

fn to_owned(_input: &Self::Input<'_>) -> Self::Owned

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> PyInputSpec for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> PyInputSpec for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> PyInputSpec for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> PyInputSpec for (T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8> PyInputSpec for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T1, T2, T3, T4, T5, T6, T7> PyInputSpec for (T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T1, T2, T3, T4, T5, T6> PyInputSpec for (T1, T2, T3, T4, T5, T6)

Source§

impl<T1, T2, T3, T4, T5> PyInputSpec for (T1, T2, T3, T4, T5)

Source§

impl<T1, T2, T3, T4> PyInputSpec for (T1, T2, T3, T4)

Source§

impl<T1, T2, T3> PyInputSpec for (T1, T2, T3)

Source§

impl<T1, T2> PyInputSpec for (T1, T2)
where T1: CuMsgPayload, T2: CuMsgPayload,

Source§

type Input<'m> = (&'m CuStampedData<T1, CuMsgMetadata>, &'m CuStampedData<T2, CuMsgMetadata>) where Self: 'm

Source§

type Owned = (CuStampedData<T1, CuMsgMetadata>, CuStampedData<T2, CuMsgMetadata>)

Source§

fn to_owned(input: &Self::Input<'_>) -> Self::Owned

Source§

impl<T> PyInputSpec for (T,)
where T: CuMsgPayload,

Source§

type Input<'m> = CuStampedData<T, CuMsgMetadata> where Self: 'm

Source§

type Owned = CuStampedData<T, CuMsgMetadata>

Source§

fn to_owned(input: &Self::Input<'_>) -> Self::Owned

Implementors§