serenity/
prelude.rs

1//! A set of exports which can be helpful to use.
2//!
3//! Note that the `SerenityError` re-export is equivalent to [`serenity::Error`], although is
4//! re-exported as a separate name to remove likely ambiguity with other crate error enums.
5//!
6//! # Examples
7//!
8//! Import all of the exports:
9//!
10//! ```rust
11//! use serenity::prelude::*;
12//! ```
13//!
14//! [`serenity::Error`]: crate::Error
15
16pub use tokio::sync::{Mutex, RwLock};
17#[cfg(feature = "client")]
18pub use typemap_rev::{TypeMap, TypeMapKey};
19
20#[cfg(feature = "client")]
21pub use crate::client::Context;
22#[cfg(all(feature = "client", feature = "gateway"))]
23pub use crate::client::{Client, ClientError, EventHandler, RawEventHandler};
24pub use crate::error::Error as SerenityError;
25#[cfg(feature = "gateway")]
26pub use crate::gateway::GatewayError;
27#[cfg(feature = "http")]
28pub use crate::http::CacheHttp;
29#[cfg(feature = "http")]
30pub use crate::http::HttpError;
31pub use crate::model::mention::Mentionable;
32#[cfg(feature = "model")]
33pub use crate::model::{gateway::GatewayIntents, ModelError};