link_with_server

Function link_with_server 

Source
pub async fn link_with_server(
    server_addr: impl AsRef<str>,
    code: impl AsRef<str>,
) -> Result<(String, String), MineChatError>
Expand description

Handles linking with the server.

§Arguments

  • server_addr - The address of the server to connect to.
  • code - The link code to authenticate with the server.

§Returns

  • Result<(String, String), MineChatError> - Returns a tuple containing the client UUID and server address if linking is successful, otherwise returns an error.