docs.rs failed to build tauri-plugin-power-manager-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Tauri Plugin power-manager
This plugin provides a cross platform way to shut down, reboot or log out operations.
Supported platforms: Linux
, Windows
and macOS
.
Installation
To install the Rust plugin, run:
Then, load the plugin in your Tauri app as follows:
.plugin // THIS LINE
// More builder methods
.run
.expect;
default
Finally, install the JS client bindings:
API
/**
* Calls the OS-specific function to force to log out the user.
*/
export declare const forceLogout: () => Promise<void>;
/**
* Calls the OS-specific function to force to reboot the machine.
*/
export declare const forceReboot: () => Promise<void>;
/**
* Calls the OS-specific function to force to shut down the machine.
*/
export declare const forceShutdown: () => Promise<void>;
/**
* Calls the OS-specific function to hibernate the machine.
*/
export declare const hibernate: () => Promise<void>;
/**
* Calls the OS-specific function to log out the user.
*/
export declare const logout: () => Promise<void>;
/**
* Calls the OS-specific function to reboot the machine.
*/
export declare const reboot: () => Promise<void>;
/**
* Calls the OS-specific function to shut down the machine.
*/
export declare const shutdown: () => Promise<void>;
/**
* Calls the OS-specific function to put the machine to sleep.
*/
export declare const sleep: () => Promise<void>;