Skip to main content

auraxis/
lib.rs

1#![cfg_attr(feature = "api", feature(impl_trait_in_assoc_type))]
2#![allow(dead_code)]
3#![allow(unused_variables)]
4
5#[cfg(feature = "api")]
6pub mod api;
7mod constants;
8pub mod realtime;
9
10pub use constants::*;
11
12use thiserror::Error;
13
14#[derive(Error, Debug)]
15pub enum AuraxisError {
16    #[error("Websocket error")]
17    WebSocketError(#[from] tokio_tungstenite::tungstenite::Error),
18    #[error("Ser(de) error")]
19    SerdeError(#[from] serde_json::Error),
20    #[error("Http error")]
21    #[cfg(feature = "api")]
22    HttpError(#[from] reqwest::Error),
23    #[error(transparent)]
24    Unknown(#[from] anyhow::Error),
25}
26
27pub type CharacterID = u64;
28pub type OutfitID = u64;
29pub type ZoneID = u32;
30pub type FacilityID = u32;
31pub type ExperienceID = u16;
32pub type VehicleID = u16;
33pub type WeaponID = u32;
34pub type FiremodeID = u32;