[][src]Trait weechat::config::SectionWriteDefaultCallback

pub trait SectionWriteDefaultCallback: 'static {
    fn callback(
        &mut self,
        weechat: &Weechat,
        config: &Conf,
        section: &mut ConfigSection
    ); }

Trait for the section write-default 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

fn callback(
    &mut self,
    weechat: &Weechat,
    config: &Conf,
    section: &mut ConfigSection
)

Callback that will be called when the section needs to be populated with default values.

Arguments

  • weechat - A Weechat context.

  • config - A borrowed version of the Weechat configuration object.

  • section - The section that is being populated with default values, if the Config struct is contained inside of self make sure not to borrow the same section again.

Loading content...

Implementors

impl<T: FnMut(&Weechat, &Conf, &mut ConfigSection) + 'static> SectionWriteDefaultCallback for T[src]

Loading content...