pub struct AllocationInfo {Show 28 fields
pub address: String,
pub type_name: String,
pub size: usize,
pub var_name: String,
pub timestamp: String,
pub thread_id: String,
pub immutable_borrows: usize,
pub mutable_borrows: usize,
pub is_clone: bool,
pub clone_count: usize,
pub timestamp_alloc: u64,
pub timestamp_dealloc: u64,
pub lifetime_ms: Option<f64>,
pub observed_age_ms: Option<f64>,
pub is_leaked: bool,
pub allocation_state: AllocationState,
pub leak_status: LeakStatus,
pub allocation_type: String,
pub is_smart_pointer: bool,
pub smart_pointer_type: String,
pub source_file: Option<String>,
pub source_line: Option<u32>,
pub module_path: Option<String>,
pub generation_id: usize,
pub provenance: String,
pub evidence: EvidenceLevel,
pub confidence: RiskConfidence,
pub layout_snapshot: Option<TypeLayoutSnapshot>,
}Expand description
One of several same-named AllocationInfo types in this crate: this one is the
the dashboard/JSON DTO; never a source of truth for the ledger.
Convert at the module boundary instead of passing it across; a global rename is deliberately avoided (see DATA_ACCURACY_DEVELOPMENT_PLAN §14.2). Allocation information for dashboard
Fields§
§address: StringMemory address
type_name: StringType name
size: usizeAllocation size in bytes
var_name: StringVariable name
timestamp: StringTimestamp
thread_id: StringThread ID
immutable_borrows: usizeBorrow information
mutable_borrows: usize§is_clone: boolClone information
clone_count: usize§timestamp_alloc: u64Allocation timestamp (nanoseconds)
timestamp_dealloc: u64Deallocation timestamp (nanoseconds, 0 if not freed)
lifetime_ms: Option<f64>Lifetime in milliseconds
observed_age_ms: Option<f64>Censored age at the report cut, separate from completed lifetime.
is_leaked: boolWhether memory is leaked.
Compatibility projection of Self::leak_status: only suspected or
confirmed allow true. A missing deallocation timestamp is NOT a leak.
allocation_state: AllocationStatePhysical allocation state observed at the snapshot cut.
This is a fact, not a conclusion: live only means “no release event was
recorded inside the capture window”.
leak_status: LeakStatusLeak conclusion for this allocation at the snapshot cut.
allocation_type: StringAllocation type (stack, heap, etc.)
is_smart_pointer: boolWhether this is a smart pointer
smart_pointer_type: StringSmart pointer type (Arc, Rc, Box, etc.)
source_file: Option<String>Source file where allocation occurred
source_line: Option<u32>Source line where allocation occurred
module_path: Option<String>Module path where allocation occurred
generation_id: usizeAllocation generation id (incremented on pointer address reuse)
provenance: StringPointer provenance (allocator, clone, smart_pointer, reused_address).
Leakage is not provenance: it is reported through leak_status.
evidence: EvidenceLevelEvidence level for this allocation’s analysis
confidence: RiskConfidenceRisk confidence for this allocation
layout_snapshot: Option<TypeLayoutSnapshot>Type layout snapshot for this allocation
Trait Implementations§
Source§impl Clone for AllocationInfo
impl Clone for AllocationInfo
Source§impl Debug for AllocationInfo
impl Debug for AllocationInfo
Source§impl<'de> Deserialize<'de> for AllocationInfo
impl<'de> Deserialize<'de> for AllocationInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for AllocationInfo
impl Freeze for AllocationInfo
impl RefUnwindSafe for AllocationInfo
impl Send for AllocationInfo
impl Sync for AllocationInfo
impl Unpin for AllocationInfo
impl UnsafeUnpin for AllocationInfo
impl UnwindSafe for AllocationInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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