Skip to main content

value_type

Function value_type 

Source
pub fn value_type(name: &str) -> String
Expand description

The name an application value type (a #[value] enum or record) has in generated Swift and Kotlin: Layout → App_Layout.

Those types sit at the top of the module the generated code shares with the platform’s frameworks and Bern’s runtime, so a bare name like SwiftUI’s Layout or View, or Compose’s Modifier, would hide the framework’s type from every file of the module. No type of those frameworks and none of Bern’s (Bern…) begins with App_, and the prefix keeps distinct names distinct.