Trait SupportedParameterType

Source
pub trait SupportedParameterType<T> {
    // Required methods
    fn get_hyperlight_type() -> ParameterType;
    fn get_hyperlight_value(&self) -> ParameterValue;
    fn get_inner(a: ParameterValue) -> Result<T>;
}
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<SupportedType>

Required Methods§

Source

fn get_hyperlight_type() -> ParameterType

Get the underlying Hyperlight parameter type representing this SupportedParameterType

Source

fn get_hyperlight_value(&self) -> ParameterValue

Get the underling Hyperlight parameter value representing this SupportedParameterType

Source

fn get_inner(a: ParameterValue) -> Result<T>

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

Source§

impl SupportedParameterType<i32> for i32

Source§

impl SupportedParameterType<i64> for i64

Source§

impl SupportedParameterType<u32> for u32

Source§

impl SupportedParameterType<u64> for u64

Source§

impl SupportedParameterType<String> for String

Source§

impl SupportedParameterType<Vec<u8>> for Vec<u8>

Implementors§