Skip to content

Instantly share code, notes, and snippets.

@dsociative
Last active August 29, 2015 14:15
Show Gist options
  • Save dsociative/32d9b4b0a465ff8dc546 to your computer and use it in GitHub Desktop.
Save dsociative/32d9b4b0a465ff8dc546 to your computer and use it in GitHub Desktop.
struct Inventory {
slot1: Slot,
slot2: Slot,
slot3: Slot
}
struct User {
name: Field,
inventory: Inventory
}
impl User {
fn new() {
return User {
name: Field {key: "user:name"},
inventory: Inventory {
key: "user:inventory",
slot1: {key: "user:inventory:slot1"},
slot2: {key: "user:inventory:slot2"},
slot3: {key: "user:inventory:slot3"},
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment