[][src]Trait serenity::framework::Framework

pub trait Framework {
    fn dispatch(&mut self, _: Context, _: Message, _: &ThreadPool);
}

A trait for defining your own framework for serenity to use.

Should you implement this trait, or define a message handler, depends on you. However, using this will benefit you by abstracting the EventHandler away, and providing a reference to serenity's threadpool, so that you may run your commands in separate threads.

Required methods

fn dispatch(&mut self, _: Context, _: Message, _: &ThreadPool)

Loading content...

Implementations on Foreign Types

impl<F: Framework + ?Sized> Framework for Box<F>[src]

impl<'a, F: Framework + ?Sized> Framework for &'a mut F[src]

Loading content...

Implementors

impl Framework for StandardFramework[src]

Loading content...