pub struct NoController;Expand description
The default, host/test PowerController that performs no hardware
action.
A PowerManager built with PowerManager::new holds a NoController.
Its set_power_mode is an explicit,
documented no-op that returns Ok(()) — the PowerManager still records
the requested mode, so the manager behaves as a software bookkeeping layer,
but no clock tree is reprogrammed and no peripheral is gated. Because it
reports is_hardware == false, callers that
require real transitions can detect its presence via
PowerManager::has_hardware_controller or fail loudly with
PowerManager::request_mode_strict.
Install a real BSP-provided PowerController with
PowerManager::with_controller to get actual power transitions.
Trait Implementations§
Source§impl Clone for NoController
impl Clone for NoController
Source§fn clone(&self) -> NoController
fn clone(&self) -> NoController
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NoController
Source§impl Debug for NoController
impl Debug for NoController
Source§impl Default for NoController
impl Default for NoController
Source§fn default() -> NoController
fn default() -> NoController
impl Eq for NoController
Source§impl PartialEq for NoController
impl PartialEq for NoController
Source§impl PowerController for NoController
impl PowerController for NoController
Source§fn set_power_mode(&self, mode: PowerMode) -> Result<()>
fn set_power_mode(&self, mode: PowerMode) -> Result<()>
No-op: records nothing at the hardware level and reports success so the
owning PowerManager can act as a bookkeeping layer. See the type
docs for the honesty contract.