Skip to main content

RuntimeValueEncode

Trait RuntimeValueEncode 

Source
pub trait RuntimeValueEncode {
    // Required method
    fn to_value(&self) -> Value;
}
Expand description

Runtime-only lowering from a typed value into the canonical Value union.

This contract must not be used as a persisted-row or primary-key codec.

Required Methods§

Source

fn to_value(&self) -> Value

Lower this typed value into its canonical runtime representation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl RuntimeValueEncode for &str

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for ()

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for Principal

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for String

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for bool

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for i8

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for i16

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for i32

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for i64

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for i128

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for u8

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for u16

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for u32

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for u64

Source§

fn to_value(&self) -> Value

Source§

impl RuntimeValueEncode for u128

Source§

fn to_value(&self) -> Value

Source§

impl<K, V> RuntimeValueEncode for BTreeMap<K, V>

Source§

fn to_value(&self) -> Value

Source§

impl<T: RuntimeValueEncode> RuntimeValueEncode for Box<T>

Source§

fn to_value(&self) -> Value

Source§

impl<T: RuntimeValueEncode> RuntimeValueEncode for Option<T>

Source§

fn to_value(&self) -> Value

Source§

impl<T: RuntimeValueEncode> RuntimeValueEncode for Vec<T>

Source§

fn to_value(&self) -> Value

Source§

impl<T> RuntimeValueEncode for BTreeSet<T>

Source§

fn to_value(&self) -> Value

Implementors§