Skip to main content

coerce

Function coerce 

Source
pub fn coerce(
    value: Expr,
    ty: &Type,
    language: Language,
    span: Option<Span>,
    flavor: Option<Flavor>,
) -> Result<Expr>
Expand description

Inserts the source language’s implicit conversions, which only JavaScript has.

§Errors

When the value cannot take the type.