pub struct Config {Show 16 fields
pub device: Option<String>,
pub driver: BatteryDriver,
pub model: Option<String>,
pub interval: Seconds,
pub format: FormatConfig,
pub full_format: FormatConfig,
pub charging_format: FormatConfig,
pub empty_format: FormatConfig,
pub not_charging_format: FormatConfig,
pub missing_format: FormatConfig,
pub info: f64,
pub good: f64,
pub warning: f64,
pub critical: f64,
pub full_threshold: f64,
pub empty_threshold: f64,
}
Fields§
§device: Option<String>
§driver: BatteryDriver
§model: Option<String>
§interval: Seconds
§format: FormatConfig
§full_format: FormatConfig
§charging_format: FormatConfig
§empty_format: FormatConfig
§not_charging_format: FormatConfig
§missing_format: FormatConfig
§info: f64
§good: f64
§warning: f64
§critical: f64
§full_threshold: f64
§empty_threshold: f64
Trait Implementations§
source§impl Default for Config
impl Default for Config
source§fn default() -> Self
fn default() -> Self
Return Config { device: Default::default(), driver: Default::default(), model: Default::default(), interval: 10.into(), format: Default::default(), full_format: Default::default(), charging_format: Default::default(), empty_format: Default::default(), not_charging_format: Default::default(), missing_format: Default::default(), info: 60.0, good: 60.0, warning: 30.0, critical: 15.0, full_threshold: 95.0, empty_threshold: 7.5 }
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.