pub enum RenderImageStrategy {
EverySample,
Interval(Duration),
OnlyFinal,
}Expand description
When should RenderProgress contain an image of the rendering
Variants§
EverySample
Every sample should contain an image
Interval(Duration)
Only include an image if at least “duration” has elapsed since last time Plus always include the final image
OnlyFinal
Only include image in last rendered sample
Implementations§
Source§impl RenderImageStrategy
impl RenderImageStrategy
Sourcepub fn should_generate_image(
&self,
sample: u32,
total_samples: u32,
now: SystemTime,
last_image_generated_time: SystemTime,
) -> bool
pub fn should_generate_image( &self, sample: u32, total_samples: u32, now: SystemTime, last_image_generated_time: SystemTime, ) -> bool
Is it time to generate a new render image for the output channel?
Trait Implementations§
Source§impl Clone for RenderImageStrategy
impl Clone for RenderImageStrategy
Source§fn clone(&self) -> RenderImageStrategy
fn clone(&self) -> RenderImageStrategy
Returns a duplicate 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 moreimpl Copy for RenderImageStrategy
Auto Trait Implementations§
impl Freeze for RenderImageStrategy
impl RefUnwindSafe for RenderImageStrategy
impl Send for RenderImageStrategy
impl Sync for RenderImageStrategy
impl Unpin for RenderImageStrategy
impl UnsafeUnpin for RenderImageStrategy
impl UnwindSafe for RenderImageStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more