summaryrefslogtreecommitdiff
path: root/shared/src/packets.rs
diff options
context:
space:
mode:
Diffstat (limited to 'shared/src/packets.rs')
-rw-r--r--shared/src/packets.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/src/packets.rs b/shared/src/packets.rs
index a5c017d..dad09ce 100644
--- a/shared/src/packets.rs
+++ b/shared/src/packets.rs
@@ -72,6 +72,11 @@ impl Object {
Self(rand::random())
}
}
+impl Default for Object {
+ fn default() -> Self {
+ Self::new()
+ }
+}
impl Packet {
fn serialize_inner(&self, w: &mut impl Write) -> Result<()> {
match self {
@@ -222,3 +227,6 @@ impl Display for Object {
.finish()
}
}
+impl Object {
+ pub const ROOT: Object = Object(0);
+}