pub trait ParameterTuple:
Sized
+ Clone
+ Send
+ Sync
+ 'static {
const SIZE: usize;
const TYPE: &[ParameterType];
// Required methods
fn into_value(self) -> Vec<ParameterValue>;
fn from_value(value: Vec<ParameterValue>) -> Result<Self, Error>;
}Expand description
A trait to describe the tuple of parameters that a host function can take.
Functions take at most 32 parameters.
fn takes<T: hyperlight_common::func::ParameterTuple>() {}
takes::<(
i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
)>();ⓘ
fn takes<T: hyperlight_common::func::ParameterTuple>() {}
takes::<(
i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32,
i32,
)>();Required Associated Constants§
Sourceconst TYPE: &[ParameterType]
const TYPE: &[ParameterType]
The underlying Hyperlight parameter types representing this tuple of SupportedParameterType
Required Methods§
Sourcefn into_value(self) -> Vec<ParameterValue>
fn into_value(self) -> Vec<ParameterValue>
Get the underling Hyperlight parameter value representing this
SupportedParameterType
Sourcefn from_value(value: Vec<ParameterValue>) -> Result<Self, Error>
fn from_value(value: Vec<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".