Function scale_typegen_description::type_description
source ยท pub fn type_description(
type_id: u32,
type_registry: &PortableRegistry,
format: bool
) -> Result<String>Expand description
Describes the type that is registered under the given type_id. This type description
is supposed to be very close to actual rust types, with some minar differences:
- The
structkeyword is omitted. So the description ofstruct Human { age: u8 }is justHuman { age: u8 }. - Types are presented in a nested fashion, similar to how structures can be defined in e.g. the C programming language.
If the format flag is enabled, the end result is formatted across multiple lines. Otherwise the description will be one single line string.