pub struct AllocationSite {
pub var: String,
pub func: String,
pub size_estimate: u64,
pub status: EscapeStatus,
}Expand description
Describes a single allocation site within a function.
Fields§
§var: StringThe variable that holds the allocated value.
func: StringThe function in which this allocation occurs.
size_estimate: u64Estimated size of the allocation in bytes.
status: EscapeStatusThe escape status for this allocation.
Implementations§
Source§impl AllocationSite
impl AllocationSite
Sourcepub fn new(var: impl Into<String>, func: impl Into<String>) -> Self
pub fn new(var: impl Into<String>, func: impl Into<String>) -> Self
Create a new allocation site with Unknown status and zero size estimate.
Sourcepub fn set_status(&mut self, s: EscapeStatus)
pub fn set_status(&mut self, s: EscapeStatus)
Update the escape status of this allocation site.
Trait Implementations§
Source§impl Clone for AllocationSite
impl Clone for AllocationSite
Source§fn clone(&self) -> AllocationSite
fn clone(&self) -> AllocationSite
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 moreAuto Trait Implementations§
impl Freeze for AllocationSite
impl RefUnwindSafe for AllocationSite
impl Send for AllocationSite
impl Sync for AllocationSite
impl Unpin for AllocationSite
impl UnsafeUnpin for AllocationSite
impl UnwindSafe for AllocationSite
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