pub struct SleepSystem { /* private fields */ }Expand description
Sleep system
Implementations§
Source§impl SleepSystem
impl SleepSystem
pub fn new(_config: &BrainConfig) -> Self
pub fn should_sleep(&self) -> bool
pub fn initiate_sleep(&mut self) -> Result<()>
pub fn wake_up(&mut self) -> Result<()>
pub fn process_cycle(&mut self) -> Result<SleepOutput>
pub fn current_stage_name(&self) -> Option<String>
pub fn is_rem(&self) -> bool
pub fn is_sws(&self) -> bool
pub fn sleep_depth(&self) -> f64
pub fn cycles_completed(&self) -> usize
pub fn circadian_phase(&self) -> f64
pub fn update_circadian(&mut self, hours: f64)
pub fn circadian_suggests_sleep(&self) -> bool
pub fn reset(&mut self)
Auto Trait Implementations§
impl Freeze for SleepSystem
impl RefUnwindSafe for SleepSystem
impl Send for SleepSystem
impl Sync for SleepSystem
impl Unpin for SleepSystem
impl UnwindSafe for SleepSystem
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