proton_power_monitor

Native power and idle state queries for MoonBit on Windows, Linux, and macOS.

power-monitor
native
windows
linux
macos
power-management
moon add moonbit-community/proton_power_monitor@0.1.18
Download zip
Version
0.1.18
License
Apache-2.0
Last updated
4 hours ago
Downloads
6
README

#proton_power_monitor

Native power and idle state queries for MoonBit on Windows, Linux, and macOS.

#
PowerMonitorError

pub(all) suberror PowerMonitorError {
BackendUnavailable(detail~ : String)
OperationFailed(operation~ : String, detail~ : String)
} derive(Eq)

#
PowerMonitorError::equal

#
PowerMonitorError::not_equal

fn PowerMonitorError::not_equal(x : PowerMonitorError, y : PowerMonitorError) -> Bool

#
PowerMonitorError::output

fn PowerMonitorError::output(self : PowerMonitorError, logger : &Logger) -> Unit

#
PowerMonitorError::to_string

fn PowerMonitorError::to_string(self : PowerMonitorError) -> String

#
PowerMonitor

pub struct PowerMonitor {
// private fields
}

#
PowerMonitor::destroy

fn PowerMonitor::destroy(self : PowerMonitor) -> Unit

#
PowerMonitor::idle_seconds

fn PowerMonitor::idle_seconds(self : PowerMonitor) -> Int raise PowerMonitorError

#
PowerMonitor::new

#
PowerMonitor::power_source

#
PowerSource

pub(all) enum PowerSource {
Unknown
AC
Battery
} derive(Eq,
Debug
)

#
PowerSource::equal

fn PowerSource::equal(PowerSource, PowerSource) -> Bool

#
PowerSource::not_equal

fn PowerSource::not_equal(x : PowerSource, y : PowerSource) -> Bool

#
PowerSourceInfo

pub(all) struct PowerSourceInfo {
source : PowerSource
battery_percent : Int?
} derive(Eq,
Debug
)

#
PowerSourceInfo::equal

#
PowerSourceInfo::not_equal

fn PowerSourceInfo::not_equal(x : PowerSourceInfo, y : PowerSourceInfo) -> Bool

#
State

pub type State

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io