#[non_exhaustive]
pub enum FrameEvent {
Sync,
Complete,
}
Expand description
Identifiers that are passed to FrameCallback
functions.
Identifiers that are passed to FrameCallback
functions
(registered using Onscreen::add_frame_callback
) that
mark the progression of a frame in some way which usually
means that new information will have been accumulated in the
frame’s corresponding FrameInfo
object::
The last event that will be sent for a frame will be a
FrameEvent::Complete
event and so these are a good
opportunity to collect statistics about a frame since the
FrameInfo
should hold the most data at this point.
A frame may not be completed before the next frame can start so applications should avoid needing to collect all statistics for a particular frame before they can start a new frame.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Sync
Notifies that the system compositor has acknowledged a frame and is ready for a new frame to be created.
Complete
Notifies that a frame has ended. This
is a good time for applications to
collect statistics about the frame
since the FrameInfo
should hold
the most data at this point. No other
events should be expected after a
FrameEvent::Complete
event.
Trait Implementations
sourceimpl Clone for FrameEvent
impl Clone for FrameEvent
sourcefn clone(&self) -> FrameEvent
fn clone(&self) -> FrameEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FrameEvent
impl Debug for FrameEvent
sourceimpl Display for FrameEvent
impl Display for FrameEvent
sourceimpl Hash for FrameEvent
impl Hash for FrameEvent
sourceimpl Ord for FrameEvent
impl Ord for FrameEvent
sourceimpl PartialEq<FrameEvent> for FrameEvent
impl PartialEq<FrameEvent> for FrameEvent
sourceimpl PartialOrd<FrameEvent> for FrameEvent
impl PartialOrd<FrameEvent> for FrameEvent
sourcefn partial_cmp(&self, other: &FrameEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &FrameEvent) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for FrameEvent
impl Eq for FrameEvent
impl StructuralEq for FrameEvent
impl StructuralPartialEq for FrameEvent
Auto Trait Implementations
impl RefUnwindSafe for FrameEvent
impl Send for FrameEvent
impl Sync for FrameEvent
impl Unpin for FrameEvent
impl UnwindSafe for FrameEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
fn clamped(self, min: T, max: T) -> T
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.