diff options
author | HampusM <hampus@hampusmat.com> | 2025-09-26 18:12:05 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-09-26 18:12:05 +0200 |
commit | 43430f8ce957290caf70b6ca0da0b8fd326f32c0 (patch) | |
tree | 322ffa78e1b4ebe4bdf8c3bdfb6d619e7aa0ed20 /ecs | |
parent | 142b97381b3c6fc2e823884f55a05897cc27a9e1 (diff) |
feat(ecs): add id fn to pair::WithWildcard
Diffstat (limited to 'ecs')
-rw-r--r-- | ecs/src/pair.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<Relation, Target> 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. /// |