wow_world_messages 0.3.0

Message definitions for World of Warcraft world servers
Documentation
//! # `wow_world_messages`
//!
//!  Implementation of the network protocol used between World of
//!  Warcraft [game servers and clients](https://wowdev.wiki/World_Packet) for game versions 1.12.x (Vanilla), 2.4.3 (The Burning Crusade), and 3.3.5 (Wrath of the Lich King).
//!  See the [WoWDev Login page](https://wowdev.wiki/Login) for details on getting to this message exchange.
//!
//!  ## Usage
//!
//!  Remove the expansions you don't need from the following command:
//!
//!  ```bash
//!  cargo add wow_world_messages --features 'vanilla tbc wrath sync tokio async-std flate2 chrono'
//!  ```
//! The library is split into the top level modules:
//!
//! * [`vanilla`] for items valid for version 1.12.x.
//! * [`tbc`] for items valid for version 2.4.3.8606.
//! * [`wrath`] for items valid for version 3.3.5.12340.
//! * [`shared`] for items that are valid for multiple versions.
//!
//! These are also exported through the regular modules, so for example if you are working with vanilla it is only necessary to export items from [`vanilla`].
//!
//!
//! ## Features/Serde support
//!
//! This crate has the following features:
//!
//! * `vanilla`, for client version 1.12.x.
//! * `tbc`, for client version 2.4.3.8606.
//! * `wrath`, for client version 3.3.5.x.
//! * `encryption`, for functions that take automatically encrypt/decrypt the header.
//! * `chrono`, for support for adding a [`TryFrom`] `chrono::prelude::TimeZone` to [`DateTime`].
//! * `flate2`, for supporting compressed messages.
//! * `tokio`, for `tokio` async support.
//! * `async-std` for `async-std` async support.
//!
//!
//!  ## Design Decisions
//!
//!  Types have been named the ugly `CMD_SCREAMING_SNAKE_CASE` way because that's
//!  what other (mostly C++) emulators call them. This makes it significantly easier
//!  to search through other emulators or other documentation.
//!
//!  ## Examples
//!
//!  The [`wow_messages` repo](https://github.com/gtker/wow_messages/tree/main/examples) has a few example applications that showcase the library.
//!
//! ## Auto Generation
//!
//! This crate is partially auto generated by the `wowm` files in the
//! [`wow_messages` repository](https://github.com/gtker/wow_messages/).
//!
//!  ## Other Work
//!
//!  * [`vMaNGOS` (C++)](https://github.com/vmangos/core)
//!    and `MaNGOS` derivatives in general have a relatively complete list of messages for popular versions,
//!    but they are not available as a library.
#![forbid(unsafe_code)]
#![warn(
    clippy::complexity,
    clippy::correctness,
    clippy::perf,
    clippy::missing_panics_doc,
    clippy::style,
    clippy::missing_const_for_fn,
    clippy::doc_markdown,
    clippy::unseparated_literal_suffix
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

pub mod errors;
pub(crate) mod helper;
pub(crate) mod manual;
pub(crate) mod traits;
pub(crate) mod util;
#[allow(
    non_camel_case_types,
    unused,
    clippy::single_match,
    clippy::too_many_arguments,
    clippy::large_enum_variant,
    clippy::enum_variant_names,
    clippy::approx_constant,
    clippy::upper_case_acronyms,
    clippy::needless_borrow,
    clippy::identity_op,
    clippy::missing_errors_doc,
    clippy::needless_borrows_for_generic_args,
    clippy::doc_lazy_continuation,
    clippy::doc_markdown
)]
#[rustfmt::skip]
// Panics in testcase prints
#[allow(clippy::never_loop)]
mod world;

pub(crate) use traits::private;
pub use traits::Message;

#[cfg(any(feature = "vanilla", feature = "tbc", feature = "wrath"))]
pub use world::*;

#[cfg(any(feature = "vanilla", feature = "tbc", feature = "wrath"))]
pub use wow_world_base::shared::datetime_vanilla_tbc_wrath::*;
#[cfg(any(feature = "vanilla", feature = "tbc", feature = "wrath"))]
pub use wow_world_base::shared::guid_vanilla_tbc_wrath::Guid;

/// Default port that is connected to whenever a port isn't specified.
pub const DEFAULT_PORT: u16 = 8085;