pub trait CompletionCallback {
// Required method
fn callback(
&mut self,
weechat: &Weechat,
buffer: &Buffer<'_>,
completion_name: Cow<'_, str>,
completion: &Completion,
) -> Result<(), ()>;
}Expand description
Trait for the completion callback.
A blanket implementation for pure FnMut functions exists, if data needs to
Required Methods§
Sourcefn callback(
&mut self,
weechat: &Weechat,
buffer: &Buffer<'_>,
completion_name: Cow<'_, str>,
completion: &Completion,
) -> Result<(), ()>
fn callback( &mut self, weechat: &Weechat, buffer: &Buffer<'_>, completion_name: Cow<'_, str>, completion: &Completion, ) -> Result<(), ()>
Callback that will be called if when a completion is requested.
§Arguments
-
weechat- A Weechat context. -
buffer- The currently active buffer that requested the completion to run. -
completion_name- The name of the completion. -
completion- The completion object that should be populated with completion words by the callback.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".