mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 22:52:32 +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 {
|
||||
/// Connect to a Minecraft server.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use azalea_client::Client;
|
||||
///
|
||||
|
|
|
@ -32,7 +32,9 @@ pub enum PingError {
|
|||
|
||||
/// Ping a Minecraft server.
|
||||
///
|
||||
/// ```
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use azalea_client::ping;
|
||||
///
|
||||
/// #[tokio::main]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue