Trait ruby_marshal::FromValue
source · pub trait FromValue<'a>: Sized {
// Required method
fn from_value(
ctx: &FromValueContext<'a>,
value: &'a Value,
) -> Result<Self, FromValueError>;
}
Expand description
Implemented for any type that can be created from a Ruby Value.
Required Methods§
sourcefn from_value(
ctx: &FromValueContext<'a>,
value: &'a Value,
) -> Result<Self, FromValueError>
fn from_value( ctx: &FromValueContext<'a>, value: &'a Value, ) -> Result<Self, FromValueError>
Create this type from the given value from the ValueArena
.
§Arguments
ctx
: The value extraction context.handle
: The handle that points to the value to convert.
Object Safety§
This trait is not object safe.