pub struct FrameView { /* private fields */ }
Expand description
A view of recent and slowest frames, used by GUIs.
Implementations
sourceimpl FrameView
impl FrameView
pub fn is_empty(&self) -> bool
pub fn add_frame(&mut self, new_frame: Arc<FrameData>)
sourcepub fn latest_frame(&self) -> Option<Arc<FrameData>>
pub fn latest_frame(&self) -> Option<Arc<FrameData>>
The latest fully captured frame of data.
sourcepub fn recent_frames(&self) -> impl Iterator<Item = &Arc<FrameData>>
pub fn recent_frames(&self) -> impl Iterator<Item = &Arc<FrameData>>
Oldest first
sourcepub fn slowest_frames_chronological(&self) -> Vec<Arc<FrameData>>
pub fn slowest_frames_chronological(&self) -> Vec<Arc<FrameData>>
The slowest frames so far (or since last call to Self::clear_slowest()
)
in chronological order.
sourcepub fn clear_slowest(&mut self)
pub fn clear_slowest(&mut self)
Clean history of the slowest frames.
sourcepub fn max_recent(&self) -> usize
pub fn max_recent(&self) -> usize
How many frames of recent history to store.
sourcepub fn set_max_recent(&mut self, max_recent: usize)
pub fn set_max_recent(&mut self, max_recent: usize)
How many frames of recent history to store.
sourcepub fn set_max_slow(&mut self, max_slow: usize)
pub fn set_max_slow(&mut self, max_slow: usize)
How many slow “spike” frames to store.
pub fn pack_frames(&self) -> bool
pub fn set_pack_frames(&mut self, pack_frames: bool)
sourcepub fn save_to_path(&self, path: &Path) -> Result<()>
pub fn save_to_path(&self, path: &Path) -> Result<()>
Export profile data as a .puffin
file.
sourcepub fn save_to_writer(&self, write: &mut impl Write) -> Result<()>
pub fn save_to_writer(&self, write: &mut impl Write) -> Result<()>
Export profile data as a .puffin
file.
sourcepub fn load_reader(read: &mut impl Read) -> Result<Self>
pub fn load_reader(read: &mut impl Read) -> Result<Self>
Import profile data from a .puffin
file.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for FrameView
impl Send for FrameView
impl Sync for FrameView
impl Unpin for FrameView
impl !UnwindSafe for FrameView
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