// The too many arguments is annoying, especially for when we create constructor, disable. #![allow(clippy::too_many_arguments, clippy::needless_range_loop)] #![allow(clippy::not_unsafe_ptr_arg_deref)] #![deny(missing_docs)] #![deny(clippy::missing_docs_in_private_items)] #![feature(test)] #![feature(bench_black_box)] #![feature(once_cell)] #![feature(const_option)] #![feature(is_some_with)] #![feature(new_uninit)] #![feature(get_mut_unchecked)] #![feature(strict_provenance)] //! PkmnLib //! PkmnLib is a full featured implementation of Pokemon. while currently focused on implementing //! generation 7, this library tries to offload generational differences such as move effects //! to a scripting library. //! #[doc(hidden)] pub use utils::*; use crate::dynamic_data::ScriptCategory; /// The defines module holds the core defines of the library pub mod defines; /// The dynamic data module holds data that can change during execution, and things that relate to /// this. This includes things as Pokemon themselves, battles, etc. pub mod dynamic_data; /// The Foreign Function Interface allows for non Rust applications to call this library. #[cfg(feature = "ffi")] mod ffi; /// Script implementations handles the different ways that dynamic scripts get loaded during battle. pub mod script_implementations; /// The static data module holds data that can be set once, and then never change. This includes /// things such as data about Pokemon species, data about items, etc. pub mod static_data; /// The utils module includes misc utils that are used within PkmnLib pub mod utils; /// The PokemonError enum holds all different error states that can be encountered in PkmnLib. #[derive(Debug, Clone)] pub enum PokemonError { /// A script was requested, but we were unable to find it. ScriptNotFound { /// The category of the script we requested, category: ScriptCategory, /// The unique key of the requested script. name: StringKey, }, /// We requested data for a specific target, but that target does not exist on the battle field. InvalidTargetRequested, /// Misc errors. Use of this should be minimized, but it is useful for early development. MiscError, } /// A simple result type. pub type PkmnResult = Result;