Skip to main content

ActionValue

Trait ActionValue 

pub trait ActionValue:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn param_type() -> ParamType;
    fn into_json(self) -> Value;
    fn from_json(value: &Value) -> Result<Self, String>;
}
Expand description

A value that can connect a LocalState field directly to a typed resource action.

Required Methods§

fn param_type() -> ParamType

fn into_json(self) -> Value

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

Decode a validated action argument.

§Errors

Returns an error when value does not have this action value’s type.

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§

§

impl ActionValue for bool

§

impl ActionValue for f64

§

impl ActionValue for i64

§

impl ActionValue for String

Implementors§