Handler

Trait Handler 

Source
pub trait Handler<T: Send + Sync + 'static>:
    Send
    + Sync
    + 'static {
    // Required method
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        event: Events,
        resource: Arc<T>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Events) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Events, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(BotMessageStampsUpdated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(BotMessageStampsUpdated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(ChannelCreated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(ChannelCreated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(ChannelTopicChanged) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(ChannelTopicChanged, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(DirectMessageCreated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(DirectMessageCreated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(DirectMessageDeleted) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(DirectMessageDeleted, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(DirectMessageUpdated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(DirectMessageUpdated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Joined) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Joined, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Left) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Left, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(MessageCreated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(MessageCreated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(MessageDeleted) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(MessageDeleted, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(MessageUpdated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(MessageUpdated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Ping) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(Ping, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(StampCreated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(StampCreated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(TagAdded) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(TagAdded, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(TagRemoved) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(TagRemoved, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(UserCreated) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(UserCreated, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(String) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, __arg2: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T: Send + Sync + 'static, Fut> Handler<T> for fn(String, Arc<T>) -> Fut
where Fut: Future<Output = ()> + Send + 'static,

Source§

fn handle<'life0, 'async_trait>( &'life0 self, event: Events, resource: Arc<T>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§