Trait pax_runtime::api::ToFromPaxValue
source · pub trait ToFromPaxValue: Sized + 'static {
// Required methods
fn to_pax_value(self) -> PaxValue;
fn from_pax_value(pax_value: PaxValue) -> Result<Self, String>;
fn ref_from_pax_value(pax_value: &PaxValue) -> Result<&Self, String>;
fn mut_from_pax_value(pax_value: &mut PaxValue) -> Result<&mut Self, String>;
}Expand description
This trait is implemented by all types that has a bultin equivalent representation (see to_from_impls module) This is NOT responsible for coercing between types, but returns an err in all cases where the underlying type is not exactly what is expected
Required Methods§
fn to_pax_value(self) -> PaxValue
fn from_pax_value(pax_value: PaxValue) -> Result<Self, String>
fn ref_from_pax_value(pax_value: &PaxValue) -> Result<&Self, String>
fn mut_from_pax_value(pax_value: &mut PaxValue) -> Result<&mut Self, String>
Object Safety§
This trait is not object safe.