movable_ref/pointer/
operations.rs1use super::self_ref::SelfRef;
6use crate::metadata::PointerRecomposition;
7use crate::offset::Offset;
8use std::fmt::*;
9
10impl<T: ?Sized + PointerRecomposition, I: Debug + Offset> Pointer for SelfRef<T, I> {
11 fn fmt(&self, f: &mut Formatter<'_>) -> Result {
12 write!(f, "{:p}", self as *const Self)
13 }
14}
15
16impl<T: ?Sized + PointerRecomposition, I: Debug + Offset> Debug for SelfRef<T, I> {
17 fn fmt(&self, f: &mut Formatter<'_>) -> Result {
18 f.debug_struct("SelfRef")
19 .field("ptr", &(self as *const Self))
20 .finish()
21 }
22}