diff options
| author | Zeyla Hellyer <[email protected]> | 2017-08-18 15:52:07 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-08-18 17:50:41 -0700 |
| commit | 8e296940b7e40879dcfbb185282b906804ba7e3d (patch) | |
| tree | 54be95fb526748dac526b1c5428eace0e372c0bd /src/lib.rs | |
| parent | Clippy (diff) | |
| download | serenity-8e296940b7e40879dcfbb185282b906804ba7e3d.tar.xz serenity-8e296940b7e40879dcfbb185282b906804ba7e3d.zip | |
Move the Framework trait to the framework
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -171,10 +171,6 @@ pub(crate) use cache::CacheEventsImpl; #[cfg(feature = "cache")] use std::sync::RwLock; -use model::{Message, UserId}; -use client::Context; -use tokio_core::reactor::Handle; - #[cfg(feature = "cache")] lazy_static! { /// A mutable and lazily-initialized static binding. It can be accessed @@ -213,20 +209,3 @@ lazy_static! { /// [cache module documentation]: cache/index.html pub static ref CACHE: RwLock<Cache> = RwLock::new(Cache::default()); } - -/// This trait allows for serenity to either use its builtin framework, or yours. -/// -/// When implementing, be sure to use `tokio_handle.spawn_fn(|| ...; Ok())` when dispatching -/// commands. -/// -/// Note that you may see some other methods in here as well, but they're meant to be internal only -/// for the builtin framework. -#[cfg(feature = "framework")] -pub trait Framework { - fn dispatch(&mut self, Context, Message, &Handle); - - #[cfg(feature = "builtin_framework")] - fn update_current_user(&mut self, UserId, bool) {} - #[cfg(feature = "builtin_framework")] - fn initialized(&self) -> bool { false } -} |