aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/lib.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-10-30 15:28:19 -0500
committermat <github@matdoes.dev>2022-10-30 15:28:19 -0500
commit329f8b1784b26e2149f6edb4e969e10bd419a190 (patch)
tree89c641aa1c26bb8da9e1f23337ff3114ad52b8f2 /azalea/src/lib.rs
parentc65e1fc6604baf308b8c2b20b94bf527a6721ade (diff)
downloadazalea-drasl-329f8b1784b26e2149f6edb4e969e10bd419a190.tar.xz
more docs
Diffstat (limited to 'azalea/src/lib.rs')
-rw-r--r--azalea/src/lib.rs15
1 files changed, 14 insertions, 1 deletions
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>`.
+ ///
+ /// [`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<Fut, S>,
}