pub struct MemoryGraph { /* private fields */ }
Expand description
Widget for displaying memory usage graphs
Implementations§
Source§impl MemoryGraph
impl MemoryGraph
Sourcepub fn max_history(self, max: usize) -> Self
pub fn max_history(self, max: usize) -> Self
Set the maximum history length
Sourcepub fn current_style(self, style: Style) -> Self
pub fn current_style(self, style: Style) -> Self
Set the style for current memory values
Sourcepub fn peak_style(self, style: Style) -> Self
pub fn peak_style(self, style: Style) -> Self
Set the style for peak memory values
Sourcepub fn show_values(self, show: bool) -> Self
pub fn show_values(self, show: bool) -> Self
Set whether to show values
Sourcepub fn update_algorithm(&mut self, name: &str, current_bytes: usize)
pub fn update_algorithm(&mut self, name: &str, current_bytes: usize)
Update memory usage for an algorithm
Sourcepub fn get_algorithm_data(&self, name: &str) -> Option<&MemoryData>
pub fn get_algorithm_data(&self, name: &str) -> Option<&MemoryData>
Get memory data for an algorithm
Sourcepub fn algorithm_names(&self) -> Vec<&String>
pub fn algorithm_names(&self) -> Vec<&String>
Get all algorithm names
Sourcepub fn render_widget(&self, area: Rect, buf: &mut Buffer)
pub fn render_widget(&self, area: Rect, buf: &mut Buffer)
Render the memory graph to a buffer
Trait Implementations§
Source§impl Clone for MemoryGraph
impl Clone for MemoryGraph
Source§fn clone(&self) -> MemoryGraph
fn clone(&self) -> MemoryGraph
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 moreSource§impl Debug for MemoryGraph
impl Debug for MemoryGraph
Source§impl Default for MemoryGraph
impl Default for MemoryGraph
Source§impl Widget for &MemoryGraph
impl Widget for &MemoryGraph
Auto Trait Implementations§
impl Freeze for MemoryGraph
impl RefUnwindSafe for MemoryGraph
impl Send for MemoryGraph
impl Sync for MemoryGraph
impl Unpin for MemoryGraph
impl UnwindSafe for MemoryGraph
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