Trait SwampExport

Source
pub trait SwampExport: Sized {
    // Required methods
    fn get_resolved_type(registry: &TypeRegistry) -> Type;
    fn to_swamp_value(&self, registry: &TypeRegistry) -> Value;
    fn from_swamp_value(value: &Value) -> Result<Self, String>;
}

Required Methods§

Source

fn get_resolved_type(registry: &TypeRegistry) -> Type

Source

fn to_swamp_value(&self, registry: &TypeRegistry) -> Value

Source

fn from_swamp_value(value: &Value) -> Result<Self, String>

§Errors

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.

Implementations on Foreign Types§

Source§

impl SwampExport for bool

Source§

impl SwampExport for i32

Source§

impl SwampExport for String

Implementors§