pub struct AllocInfo {
element_size: ElementSize,
num_allocs: usize,
num_elements: usize,
num_bytes: usize,
}
Expand description
Aggregate information about a bunch of allocations.
Fields§
§element_size: ElementSize
§num_allocs: usize
§num_elements: usize
§num_bytes: usize
Implementations§
source§impl AllocInfo
impl AllocInfo
pub fn from_galley(galley: &Galley) -> Self
fn from_galley_row(row: &Row) -> Self
pub fn from_mesh(mesh: &Mesh) -> Self
pub fn from_slice<T>(slice: &[T]) -> Self
pub fn num_elements(&self) -> usize
pub fn num_allocs(&self) -> usize
pub fn num_bytes(&self) -> usize
pub fn megabytes(&self) -> String
pub fn format(&self, what: &str) -> String
Trait Implementations§
source§impl AddAssign for AllocInfo
impl AddAssign for AllocInfo
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl PartialEq for AllocInfo
impl PartialEq for AllocInfo
impl Copy for AllocInfo
impl StructuralPartialEq for AllocInfo
Auto Trait Implementations§
impl Freeze for AllocInfo
impl RefUnwindSafe for AllocInfo
impl Send for AllocInfo
impl Sync for AllocInfo
impl Unpin for AllocInfo
impl UnwindSafe for AllocInfo
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