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§

The reference type of this value.

Useful for types like String where the reference type is str

Required Methods§

Tries to convert from the passed value to this type

Tries to convert from the passed value to the reference type.

Converts the value into a Value

Implementations on Foreign Types§

Implementors§