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 moreimpl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)