pub trait Convertwhere
Self: Sized,{
// Required methods
fn convert<T: ConvertFrom<Self>>(self, context: &CompileContext) -> Expr<T>;
fn can_convert<T: ConvertFrom<Self>>(&self) -> bool;
}
Required Methods§
sourcefn convert<T: ConvertFrom<Self>>(self, context: &CompileContext) -> Expr<T>
fn convert<T: ConvertFrom<Self>>(self, context: &CompileContext) -> Expr<T>
§Errors
Returns an error if the conversion is invalid.
sourcefn can_convert<T: ConvertFrom<Self>>(&self) -> bool
fn can_convert<T: ConvertFrom<Self>>(&self) -> bool
§Errors
Returns an error if the conversion is invalid.
Object Safety§
This trait is not object safe.