SupportedParameterType

Trait SupportedParameterType 

Source
pub trait SupportedParameterType:
    Sized
    + Clone
    + Send
    + Sync
    + 'static {
    const TYPE: ParameterType;

    // Required methods
    fn into_value(self) -> ParameterValue;
    fn from_value(value: ParameterValue) -> Result<Self, Error>;
}
Expand description

This is a marker trait that is used to indicate that a type is a valid Hyperlight parameter type.

For each parameter type Hyperlight supports in host functions, we provide an implementation for SupportedParameterType

Required Associated Constants§

Source

const TYPE: ParameterType

The underlying Hyperlight parameter type representing this SupportedParameterType

Required Methods§

Source

fn into_value(self) -> ParameterValue

Get the underling Hyperlight parameter value representing this SupportedParameterType

Source

fn from_value(value: ParameterValue) -> Result<Self, Error>

Get the actual inner value of this SupportedParameterType

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 SupportedParameterType for bool

Source§

impl SupportedParameterType for f32

Source§

impl SupportedParameterType for f64

Source§

impl SupportedParameterType for i32

Source§

impl SupportedParameterType for i64

Source§

impl SupportedParameterType for u32

Source§

impl SupportedParameterType for u64

Source§

impl SupportedParameterType for String

Source§

impl SupportedParameterType for Vec<u8>

Implementors§