extends = Class
The extends
attribute can be used to say that an imported type extends (in the
JS class hierarchy sense) another type. This will generate AsRef
, AsMut
, and
From
impls for converting a type into another given that we statically know
the inheritance hierarchy:
The trait implementations generated for the above block are:
The extends = ...
attribute can be specified multiple times for longer
inheritance chains, and AsRef
and such impls will be generated for each of
the types.