Trait radio::config::Configure

source ·
pub trait Configure {
    type Error;

    // Required methods
    fn set_option(
        &mut self,
        o: &ConfigOption
    ) -> Result<(), ConfigError<Self::Error>>;
    fn get_option(
        &mut self,
        o: &mut ConfigOption
    ) -> Result<(), ConfigError<Self::Error>>;
}
Expand description

Configure trait implemented by configurable radios

Required Associated Types§

source

type Error

Radio error

Required Methods§

source

fn set_option( &mut self, o: &ConfigOption ) -> Result<(), ConfigError<Self::Error>>

Set a configuration option Returns Ok(true) on set, Ok(false) for unsupported options, Err(Self::Error) for errors

source

fn get_option( &mut self, o: &mut ConfigOption ) -> Result<(), ConfigError<Self::Error>>

Fetch a configuration option This will overwrite the value of the provided option enum Returns Ok(true) on successful get, Ok(false) for unsupported options, Err(Self::Error) for errors

Implementors§