#[repr(C)]pub enum StandbyMode {
Default = 0,
Pause = 1,
Slow = 2,
None = 3,
}
Expand description
When the device StereoKit is running on goes into standby mode, how should StereoKit react? Typically the app should pause, stop playing sound, and consume as little power as possible, but some scenarios such as multiplayer games may need the app to continue running. https://stereokit.net/Pages/StereoKit/StandbyMode.html
see also SkSettings::standby_mode
Variants§
Default = 0
This will let StereoKit pick a mode based on its own preferences. On v0.3 and lower, this will be Slow, and on v0.4 and higher, this will be Pause.
Pause = 1
The entire main thread will pause, and wait until the device has come out of standby. This is the most power efficient mode for the device to take when the device is in standby, and is recommended for the vast majority of apps. This will also disable sound.
Slow = 2
The main thread will continue to execute, but with 100ms sleeps each frame. This allows the app to continue polling and processing, but reduces power consumption by throttling a bit. This will not disable sound. In the Simulator, this will behave as Slow.
None = 3
The main thread will continue to execute, but with a very short sleep each frame. This allows the app to continue polling and processing, but without flooding the CPU with polling work while vsync is no longer the throttle. This will not disable sound.
Trait Implementations§
Source§impl Clone for StandbyMode
impl Clone for StandbyMode
Source§fn clone(&self) -> StandbyMode
fn clone(&self) -> StandbyMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StandbyMode
impl Debug for StandbyMode
Source§impl PartialEq for StandbyMode
impl PartialEq for StandbyMode
impl Copy for StandbyMode
impl Eq for StandbyMode
impl StructuralPartialEq for StandbyMode
Auto Trait Implementations§
impl Freeze for StandbyMode
impl RefUnwindSafe for StandbyMode
impl Send for StandbyMode
impl Sync for StandbyMode
impl Unpin for StandbyMode
impl UnwindSafe for StandbyMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.