Trait fungui::ConvertValue
source · pub trait ConvertValue<E: Extension>: Sized {
type RefType: ?Sized;
fn from_value(v: Value<E>) -> Option<Self>;
fn from_value_ref(v: &Value<E>) -> Option<&Self::RefType>;
fn to_value(v: Self) -> Value<E>;
}
Expand description
Types that can be converted to and from a value
Required Associated Types§
Required Methods§
sourcefn from_value(v: Value<E>) -> Option<Self>
fn from_value(v: Value<E>) -> Option<Self>
Tries to convert from the passed value to this type
sourcefn from_value_ref(v: &Value<E>) -> Option<&Self::RefType>
fn from_value_ref(v: &Value<E>) -> Option<&Self::RefType>
Tries to convert from the passed value to the reference type.