Trait oracle::aq::Payload

source ·
pub trait Payload: ToOwned {
    type TypeInfo;

    // Required methods
    fn payload_type(payload_type: &Self::TypeInfo) -> Result<Option<ObjectType>>;
    fn get(props: &MsgProps<Self>) -> Result<Self::Owned>;
    fn set(&self, props: &mut MsgProps<Self>) -> Result<()>;
}
Expand description

A trait for payload type

Warning: The type is unstable. It may be changed incompatibly by minor version upgrades.

Required Associated Types§

Required Methods§

source

fn payload_type(payload_type: &Self::TypeInfo) -> Result<Option<ObjectType>>

source

fn get(props: &MsgProps<Self>) -> Result<Self::Owned>

source

fn set(&self, props: &mut MsgProps<Self>) -> Result<()>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Payload for [u8]

§

type TypeInfo = ()

source§

fn payload_type(_payload_type: &Self::TypeInfo) -> Result<Option<ObjectType>>

source§

fn get(props: &MsgProps<Self>) -> Result<Vec<u8>>

source§

fn set(&self, props: &mut MsgProps<Self>) -> Result<()>

Implementors§