Function mycelium_util::fmt::bin

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

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

§Examples

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

let n = 42;

debug!(some_number = ?n);            // will be formatted as "some_number=42"
debug!(some_number = fmt::bin(n)); //will be formatted as "some_number=0b101010"