16 lines
293 B
Plaintext

# Create an enum
enum AnimalType {
Dog,
Cat,
}
# Create a struct
struct Pet {
name: [char], # A list of characters
age: uint, # An unsigned 32-bit integer
type: AnimalType,
living: bool,
}
# Create a function that can be called on a Pet
fn on Pet rename(newName: [char]) {
return "test";
}