[−][src]Module serenity::prelude
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::model::misc::Mentionable; |
pub use crate::client::Client; |
pub use crate::model::ModelError; |
Structs
Context | The context is a general utility struct provided on event dispatches, which
helps with dealing with the current "context" of the event dispatch.
The context also acts as a general high-level interface over the associated
|
Enums
ClientError | An error returned from the |
GatewayError | An error that occurred while attempting to deal with the gateway. |
HttpError | |
SerenityError | A common error enum returned by most of the library's functionality within a
custom |
VoiceError | An error returned from the voice module. |
Traits
EventHandler | The core trait for handling events by serenity. |
RawEventHandler | This core trait for handling raw events |
TypeMapKey | This trait defines the relationship between keys and values in a TypeMap. |
Type Definitions
Mutex | A mutual exclusion primitive useful for protecting shared data |
RwLock | A reader-writer lock |
ShareMap | A version of |