mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-20 07:02:31 +00:00
add # Examples
to some docs
This commit is contained in:
parent
c9b1b19ff2
commit
587001724a
4 changed files with 9 additions and 1 deletions
|
@ -123,6 +123,8 @@ pub enum HandleError {
|
||||||
impl Client {
|
impl Client {
|
||||||
/// Connect to a Minecraft server.
|
/// Connect to a Minecraft server.
|
||||||
///
|
///
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// use azalea_client::Client;
|
/// use azalea_client::Client;
|
||||||
///
|
///
|
||||||
|
|
|
@ -32,7 +32,9 @@ pub enum PingError {
|
||||||
|
|
||||||
/// Ping a Minecraft server.
|
/// Ping a Minecraft server.
|
||||||
///
|
///
|
||||||
/// ```
|
/// # Examples
|
||||||
|
///
|
||||||
|
/// ```rust,no_run
|
||||||
/// use azalea_client::ping;
|
/// use azalea_client::ping;
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
|
|
|
@ -165,6 +165,8 @@ impl Connection<ClientboundLoginPacket, ServerboundLoginPacket> {
|
||||||
/// online-mode servers. This must happen when you get a
|
/// online-mode servers. This must happen when you get a
|
||||||
/// `ClientboundLoginPacket::Hello` packet.
|
/// `ClientboundLoginPacket::Hello` packet.
|
||||||
///
|
///
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// let token = azalea_auth::auth(azalea_auth::AuthOpts {
|
/// let token = azalea_auth::auth(azalea_auth::AuthOpts {
|
||||||
/// ..Default::default()
|
/// ..Default::default()
|
||||||
|
|
|
@ -128,6 +128,8 @@ pub enum Error {
|
||||||
/// Join a server and start handling events. This function will run forever until
|
/// Join a server and start handling events. This function will run forever until
|
||||||
/// it gets disconnected from the server.
|
/// it gets disconnected from the server.
|
||||||
///
|
///
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// let error = azalea::start(azalea::Options {
|
/// let error = azalea::start(azalea::Options {
|
||||||
/// account,
|
/// account,
|
||||||
|
|
Loading…
Reference in a new issue