Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct Creature {
- priority: i32,
- // Other fields omitted.
- }
- impl Creature {
- pub fn new() -> Creature {
- Creature{ priority: 0 }
- }
- }
- impl Priority for Creature {
- fn get_priority(&self) -> i32 {
- self.priority
- }
- fn set_priority(&mut self, value: i32) {
- self.priority = value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement