Expand description
A set of exports which can be helpful to use.
Note that the SerenityError
re-export is equivalent to serenity::Error
, although is
re-exported as a separate name to remove likely ambiguity with other crate error enums.
§Examples
Import all of the exports:
use serenity::prelude::*;
Re-exports§
pub use crate::client::Context;
client
pub use crate::client::Client;
client
andgateway
pub use crate::client::ClientError;
client
andgateway
pub use crate::client::EventHandler;
client
andgateway
pub use crate::client::RawEventHandler;
client
andgateway
pub use crate::gateway::GatewayError;
gateway
pub use crate::http::CacheHttp;
http
pub use crate::http::HttpError;
http
pub use crate::model::mention::Mentionable;
pub use crate::model::gateway::GatewayIntents;
model
pub use crate::model::ModelError;
model
Structs§
- An asynchronous
Mutex
-like type. - An asynchronous reader-writer lock.
- TypeMap
client
TypeMap is a simple abstraction around the standard library’sHashMap
type, where types are its keys. This allows for statically-checked value retrieval.
Enums§
- A common error enum returned by most of the library’s functionality within a custom
Result
.
Traits§
- TypeMapKey
client
TypeMapKey is used to declare key types that are eligible for use withTypeMap
.