Struct comfy_wgpu::spin_sleep::LoopHelperBuilder
pub struct LoopHelperBuilder { /* private fields */ }Expand description
Builds LoopHelper.
Implementations§
§impl LoopHelperBuilder
impl LoopHelperBuilder
pub fn report_interval_s(self, seconds: f64) -> LoopHelperBuilder
pub fn report_interval_s(self, seconds: f64) -> LoopHelperBuilder
Sets the interval between
LoopHelper::report_rate reports in seconds.
pub fn report_interval(self, duration: Duration) -> LoopHelperBuilder
pub fn report_interval(self, duration: Duration) -> LoopHelperBuilder
Sets the interval between
LoopHelper::report_rate reports.
pub fn native_accuracy_ns(self, accuracy: u32) -> LoopHelperBuilder
pub fn native_accuracy_ns(self, accuracy: u32) -> LoopHelperBuilder
Sets the native sleep accuracy.
See SpinSleeper::new for details.
Defaults to a platform specific opinionated value, that can change from release to release. Set this to ensure consistent behaviour across releases. However, consider that this value should be tuned & tested for a given platform.
pub fn build_without_target_rate(self) -> LoopHelper
pub fn build_without_target_rate(self) -> LoopHelper
Builds a LoopHelper without targeting a rate.
This means all calls to
LoopHelper::loop_sleep will simply return
immediately. Normally used when only interested in the LoopHelper rate reporting.
pub fn build_with_target_rate<R>(self, target_rate: R) -> LoopHelperwhere
R: Into<f64>,
pub fn build_with_target_rate<R>(self, target_rate: R) -> LoopHelperwhere R: Into<f64>,
Builds a LoopHelper targeting an input target_rate.
Note: The target_rate only affects
LoopHelper::loop_sleep.
Trait Implementations§
§impl Clone for LoopHelperBuilder
impl Clone for LoopHelperBuilder
§fn clone(&self) -> LoopHelperBuilder
fn clone(&self) -> LoopHelperBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for LoopHelperBuilder
impl Debug for LoopHelperBuilder
§impl PartialEq<LoopHelperBuilder> for LoopHelperBuilder
impl PartialEq<LoopHelperBuilder> for LoopHelperBuilder
§fn eq(&self, other: &LoopHelperBuilder) -> bool
fn eq(&self, other: &LoopHelperBuilder) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for LoopHelperBuilder
impl Eq for LoopHelperBuilder
impl StructuralEq for LoopHelperBuilder
impl StructuralPartialEq for LoopHelperBuilder
Auto Trait Implementations§
impl RefUnwindSafe for LoopHelperBuilder
impl Send for LoopHelperBuilder
impl Sync for LoopHelperBuilder
impl Unpin for LoopHelperBuilder
impl UnwindSafe for LoopHelperBuilder
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.