summaryrefslogtreecommitdiff
path: root/shared/src/packets.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-03-27 14:38:31 +0100
committermetamuffin <metamuffin@disroot.org>2025-03-27 14:38:31 +0100
commit9f16507564354422b64e437e547d8403b22b70c7 (patch)
treea2d3fee9be8c626b1832df1fa4d8aa8b6c253b3d /shared/src/packets.rs
parentd48ff95ec3739b8179b0e0f5b07d5c89f8f5b33f (diff)
downloadweareserver-9f16507564354422b64e437e547d8403b22b70c7.tar
weareserver-9f16507564354422b64e437e547d8403b22b70c7.tar.bz2
weareserver-9f16507564354422b64e437e547d8403b22b70c7.tar.zst
lay a foundation for subresource listings
Diffstat (limited to 'shared/src/packets.rs')
-rw-r--r--shared/src/packets.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/src/packets.rs b/shared/src/packets.rs
index 11b5f8a..c03f5e5 100644
--- a/shared/src/packets.rs
+++ b/shared/src/packets.rs
@@ -51,6 +51,11 @@ impl<T> Ord for Resource<T> {
self.0.cmp(&other.0)
}
}
+impl<T> Resource<T> {
+ pub fn to_generic(&self) -> Resource {
+ Resource(self.0, PhantomData)
+ }
+}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct Object(pub u128);