Skip to main content

mangled_type_name

Function mangled_type_name 

Source
pub unsafe fn mangled_type_name(meta: *const c_void) -> Option<Vec<u8>>
Expand description

The mangled name of whatever meta describes.

A type built from an opaque return — Circle.inset(by:) returns some InsettableShape — has no name at the call site to build a crate::mangle::Type from, so anything that has to spell the type it appears inside was stuck with the shape it started as. The runtime knows the name: swift_getMangledTypeName is what _mangledTypeName calls.

The $s prefix is stripped, because that is the form this crate’s manglers pass around.

§Safety

meta must be type metadata.