facet_reflect/peek/smartptr.rs
1use facet_core::SmartPointerDef;
2
3use super::Peek;
4
5/// Represents a smart pointer that can be peeked at during memory inspection.
6///
7/// This struct holds the value being pointed to and the definition of the smart pointer type.
8pub struct PeekSmartPointer<'mem, 'facet, 'shape> {
9 /// The value being pointed to by this smart pointer.
10 #[expect(dead_code)]
11 pub(crate) value: Peek<'mem, 'facet, 'shape>,
12
13 /// The definition of this smart pointer type.
14 pub(crate) def: SmartPointerDef<'shape>,
15}
16
17impl<'mem, 'facet, 'shape> PeekSmartPointer<'mem, 'facet, 'shape> {
18 /// Returns a reference to the smart pointer definition.
19 #[must_use]
20 pub fn def(&self) -> &SmartPointerDef<'shape> {
21 &self.def
22 }
23}