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.
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more