From 43430f8ce957290caf70b6ca0da0b8fd326f32c0 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 26 Sep 2025 18:12:05 +0200 Subject: feat(ecs): add id fn to pair::WithWildcard --- ecs/src/pair.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ecs/src/pair.rs b/ecs/src/pair.rs index f6d33d2..600c6e4 100644 --- a/ecs/src/pair.rs +++ b/ecs/src/pair.rs @@ -356,6 +356,13 @@ pub struct WithWildcard<'world, Relation, Target> impl WithWildcard<'_, Relation, Target> { + /// Returns the [`Uid`] of the pair. + #[must_use] + pub fn id(&self) -> Uid + { + self.component_ref.id() + } + /// Attempts to get the component data of this pair, returning `None` if the `Data` /// type is incorrect. /// -- cgit v1.2.3-18-g5258