Function mycelium_util::fmt::ptr

source ·
pub fn ptr<T: Pointer>(value: T) -> DebugValue<FormatWith<T>>
Expand description

Format the provided value using its core::fmt::Pointer implementation.

§Examples

use mycelium_util::fmt;
use tracing::debug;

let something = "a string";
let some_ref = &something;

debug!(x = ?some_ref);            // will format the pointed value ("a string")
debug!(x = fmt::ptr(some_ref)); // will format the address.