pub struct Config {
pub number: usize,
pub path: String,
pub format: Format,
pub format_down: Format,
pub status_chr: String,
pub status_bat: String,
pub status_unk: String,
pub status_full: String,
pub low_threshold: i64,
pub threshold_type: ThresholdType,
/* private fields */
}
Fields§
§number: usize
§path: String
§format: Format
§format_down: Format
§status_chr: String
§status_bat: String
§status_unk: String
§status_full: String
§low_threshold: i64
§threshold_type: ThresholdType
Trait Implementations§
Source§impl Default for Config
impl Default for Config
Source§fn default() -> Self
fn default() -> Self
Return Config { number: 0, path: ("/sys/class/power_supply/BAT%d/uevent").into(), format: Format::new().with_default("$status $percentage $remaining"), format_down: Format::new().with_default("No battery"), status_chr: ("CHR").into(), status_bat: ("BAT").into(), status_unk: ("UNK").into(), status_full: ("FULL").into(), low_threshold: 10, threshold_type: Default::default(), last_full_capacity: Default::default(), hide_seconds: Default::default() }
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
impl StructuralPartialEq for Config
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