From 0d3a091c232d409939db82dfb30f700e57583c85 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 5 Feb 2023 14:31:52 -0600 Subject: improve docs --- azalea-client/src/entity_query.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'azalea-client/src/entity_query.rs') diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs index 0e486741..7ac0e325 100644 --- a/azalea-client/src/entity_query.rs +++ b/azalea-client/src/entity_query.rs @@ -12,6 +12,15 @@ use crate::Client; impl Client { /// A convenience function for getting components of our player's entity. + /// + /// # Examples + /// ``` + /// # fn example(mut client: azalea_client::Client) { + /// let is_logged_in = client + /// .query::>(&mut client.ecs.lock()) + /// .is_some(); + /// # } + /// ``` pub fn query<'w, Q: WorldQuery>(&self, ecs: &'w mut Ecs) -> ::Item<'w> { ecs.query::() .get_mut(ecs, self.entity) -- cgit v1.2.3