add # Examples to some docs

This commit is contained in:
mat 2022-10-23 17:01:26 -05:00
parent c9b1b19ff2
commit 587001724a
4 changed files with 9 additions and 1 deletions

View file

@ -123,6 +123,8 @@ pub enum HandleError {
impl Client {
/// Connect to a Minecraft server.
///
/// # Examples
///
/// ```rust,no_run
/// use azalea_client::Client;
///

View file

@ -32,7 +32,9 @@ pub enum PingError {
/// Ping a Minecraft server.
///
/// ```
/// # Examples
///
/// ```rust,no_run
/// use azalea_client::ping;
///
/// #[tokio::main]

View file

@ -165,6 +165,8 @@ impl Connection<ClientboundLoginPacket, ServerboundLoginPacket> {
/// online-mode servers. This must happen when you get a
/// `ClientboundLoginPacket::Hello` packet.
///
/// # Examples
///
/// ```rust,no_run
/// let token = azalea_auth::auth(azalea_auth::AuthOpts {
/// ..Default::default()

View file

@ -128,6 +128,8 @@ pub enum Error {
/// Join a server and start handling events. This function will run forever until
/// it gets disconnected from the server.
///
/// # Examples
///
/// ```rust,no_run
/// let error = azalea::start(azalea::Options {
/// account,