Function starlark::coerce::coerce

source ·
pub fn coerce<From, To>(x: From) -> To
where From: Coerce<To>,
Expand description

Safely convert between types which have a Coerce relationship. Often the second type argument will need to be given explicitly, e.g. coerce::<_, ToType>(x).