[][src]Trait weechat::config::BaseConfigOption

pub trait BaseConfigOption: HidenConfigOptionT {
    fn name(&self) -> Cow<'_, str> { ... }
fn description(&self) -> Cow<'_, str> { ... }
fn section_name(&self) -> Cow<'_, str> { ... }
fn config_name(&self) -> Cow<'_, str> { ... }
fn option_type(&self) -> OptionType { ... }
fn reset(&self, run_callback: bool) -> OptionChanged { ... }
fn set(&self, value: &str, run_callback: bool) -> OptionChanged { ... }
fn is_null(&self) -> bool { ... } }

Base configuration option methods.

These methods are implemented for every option and don't depend on the option type.

Provided methods

fn name(&self) -> Cow<'_, str>

Get the name of the option.

fn description(&self) -> Cow<'_, str>

Get the description of the option.

fn section_name(&self) -> Cow<'_, str>

Get the section name of the section the option belongs to.

fn config_name(&self) -> Cow<'_, str>

Get the config name the option belongs to.

fn option_type(&self) -> OptionType

Get the type of the config option

fn reset(&self, run_callback: bool) -> OptionChanged

Resets the option to its default value.

fn set(&self, value: &str, run_callback: bool) -> OptionChanged

Set the option using a string.

Weechat will parse the string and turn it into a appropriate value depending on the option type.

Arguments

value - The value to which the option should be set.

fn is_null(&self) -> bool

Is the option undefined/null.

Loading content...

Trait Implementations

impl<'a> AsRef<dyn BaseConfigOption + 'a> for dyn BaseConfigOption + 'a[src]

impl<'a> AsRef<dyn BaseConfigOption + 'a> for BooleanOption<'a>[src]

impl<'a> AsRef<dyn BaseConfigOption + 'a> for ColorOption<'a>[src]

impl<'a> AsRef<dyn BaseConfigOption + 'a> for IntegerOption<'a>[src]

impl<'a> AsRef<dyn BaseConfigOption + 'a> for StringOption<'a>[src]

impl<'a> AsRef<dyn BaseConfigOption + 'a> for ConfigOption<'a>[src]

Implementors

impl<'a> BaseConfigOption for BooleanOption<'a>[src]

impl<'a> BaseConfigOption for ColorOption<'a>[src]

impl<'a> BaseConfigOption for IntegerOption<'a>[src]

impl<'a> BaseConfigOption for StringOption<'a>[src]

Loading content...