Trait BufferInputCallbackAsync

Source
pub trait BufferInputCallbackAsync: 'static {
    // Required method
    fn callback<'life0, 'async_trait>(
        &'life0 mut self,
        buffer: BufferHandle,
        input: String,
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on async only.
Expand description

Trait for the buffer input callback.

This is the async version of the callback.

A blanket implementation for pure FnMut functions exists, if data needs to be passed to the callback implement this over your struct.

Required Methods§

Source

fn callback<'life0, 'async_trait>( &'life0 mut self, buffer: BufferHandle, input: String, ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Callback that will be called if the user inputs something into the buffer input field.

§Arguments
  • weechat - A Weechat context.

  • buffer - The buffer that the user inputed some text into.

  • input - The input that was posted by the user.

Implementors§