Struct webrender::internal_types::FrameStamp
source · pub struct FrameStamp {
id: FrameId,
time: SystemTime,
document_id: DocumentId,
}
Expand description
Identifier to track a sequence of frames.
This is effectively a FrameId
with a ridealong timestamp corresponding
to when advance() was called, which allows for more nuanced cache eviction
decisions. As such, we use the FrameId
for equality and comparison, since
we should never have two FrameStamps
with the same id but different
timestamps.
Fields§
§id: FrameId
§time: SystemTime
§document_id: DocumentId
Implementations§
source§impl FrameStamp
impl FrameStamp
sourcepub fn time(&self) -> SystemTime
pub fn time(&self) -> SystemTime
Gets the time associated with this FrameStamp.
sourcepub fn document_id(&self) -> DocumentId
pub fn document_id(&self) -> DocumentId
Gets the DocumentId in this stamp.
pub fn is_valid(&self) -> bool
sourcepub fn first(document_id: DocumentId) -> Self
pub fn first(document_id: DocumentId) -> Self
Returns a FrameStamp corresponding to the first frame.
sourcepub const INVALID: FrameStamp = _
pub const INVALID: FrameStamp = _
An invalid sentinel FrameStamp.
Trait Implementations§
source§impl Clone for FrameStamp
impl Clone for FrameStamp
source§fn clone(&self) -> FrameStamp
fn clone(&self) -> FrameStamp
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 moresource§impl Debug for FrameStamp
impl Debug for FrameStamp
source§impl MallocSizeOf for FrameStamp
impl MallocSizeOf for FrameStamp
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for FrameStamp
impl PartialEq for FrameStamp
source§impl PartialOrd for FrameStamp
impl PartialOrd for FrameStamp
1.0.0 · source§fn 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 moresource§impl Serialize for FrameStamp
impl Serialize for FrameStamp
impl Copy for FrameStamp
impl Eq for FrameStamp
Auto Trait Implementations§
impl Freeze for FrameStamp
impl RefUnwindSafe for FrameStamp
impl Send for FrameStamp
impl Sync for FrameStamp
impl Unpin for FrameStamp
impl UnwindSafe for FrameStamp
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> 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