From 329f8b1784b26e2149f6edb4e969e10bd419a190 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 30 Oct 2022 15:28:19 -0500 Subject: more docs --- azalea/src/lib.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'azalea/src') diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index 2d0344fc..d9465062 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -94,8 +94,10 @@ where /// The address of the server that we're connecting to. This can be a /// `&str`, [`ServerAddress`], or anything that implements /// `TryInto`. + /// + /// [`ServerAddress`]: azalea_protocol::ServerAddress pub address: A, - /// The account that's going to join the server, + /// The account that's going to join the server. pub account: Account, /// A list of plugins that are going to be used. Plugins are external /// crates that add extra functionality to Azalea. @@ -116,6 +118,17 @@ where /// ``` pub state: S, /// The function that's called whenever we get an event. + /// + /// # Examples + /// + /// ```rust + /// use anyhow::Result; + /// use azalea::prelude::*; + /// + /// async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> { + /// Ok(()) + /// } + /// ``` pub handle: HandleFn, } -- cgit v1.2.3