Exercise: Health Statistics
You’re working on implementing a health-monitoring system. As part of that, you need to keep track of users’ health statistics.
You’ll start with a stubbed function in an impl
block as well as a User
struct definition. Your goal is to implement the stubbed out method on the
User
struct
defined in the impl
block.
Copy the code below to https://play.rust-lang.org/ and fill in the missing method: