pub struct DhtLoggerConfig {
pub port: PathBuf,
pub baud: u32,
pub logger_config: HashMap<String, Value>,
}
Expand description
Configuration of a DHT Logger client.
Example configuration YAML:
# Serial port configuration
port: /dev/ttyUSB0
baud: 115200
# Configure how the sensor data is logged.
logger_config:
# verbose: true tells the logger to
# use log::info! for sensor readings
verbose: true
Fields§
§port: PathBuf
§baud: u32
§logger_config: HashMap<String, Value>
Implementations§
Source§impl DhtLoggerConfig
impl DhtLoggerConfig
Sourcepub fn load_yaml(config_file: &Path) -> DhtLoggerConfig
pub fn load_yaml(config_file: &Path) -> DhtLoggerConfig
Load a YAML config file into a config struct
Trait Implementations§
Source§impl Debug for DhtLoggerConfig
impl Debug for DhtLoggerConfig
Source§impl<'de> Deserialize<'de> for DhtLoggerConfig
impl<'de> Deserialize<'de> for DhtLoggerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DhtLoggerConfig
impl RefUnwindSafe for DhtLoggerConfig
impl Send for DhtLoggerConfig
impl Sync for DhtLoggerConfig
impl Unpin for DhtLoggerConfig
impl UnwindSafe for DhtLoggerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more