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_lifetime> {
9    /// The value being pointed to by this smart pointer.
10    #[expect(dead_code)]
11    pub(crate) value: Peek<'mem, 'facet_lifetime>,
12
13    /// The definition of this smart pointer type.
14    pub(crate) def: SmartPointerDef,
15}
16
17impl PeekSmartPointer<'_, '_> {
18    /// Returns a reference to the smart pointer definition.
19    #[must_use]
20    pub fn def(&self) -> &SmartPointerDef {
21        &self.def
22    }
23}