Struct prodash::Throughput
source · [−]pub struct Throughput { /* private fields */ }
Expand description
A utility to compute throughput of a set of progress values usually available to a renderer.
Implementations
sourceimpl Throughput
impl Throughput
sourcepub fn update_elapsed(&mut self)
pub fn update_elapsed(&mut self)
Called at the beginning of the drawing of a renderer to remember at which time progress values are
going to be updated with update_and_get(…)
.
sourcepub fn update_and_get(
&mut self,
key: &Key,
progress: Option<&Value>
) -> Option<Throughput>
pub fn update_and_get(
&mut self,
key: &Key,
progress: Option<&Value>
) -> Option<Throughput>
Lookup or create the progress value at key
and set its current progress
, returning its computed
throughput.
Trait Implementations
sourceimpl Default for Throughput
impl Default for Throughput
sourcefn default() -> Throughput
fn default() -> Throughput
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for Throughput
impl Send for Throughput
impl Sync for Throughput
impl Unpin for Throughput
impl UnwindSafe for Throughput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more