Skip to main content

debug_desc

Function debug_desc 

Source
pub fn debug_desc<T: UnsignedPrimInt>(value: T) -> DebugDesc<T>
Expand description

Attempt to describe the specified UnsignedPrimInt in a format suitable for debugging or panic messages.

This differs from the standard Display and Debug implementation, because T::MAX is special-cased.

WARNING: This representation may change without warning in the future, so the exact representation should not be relied upon.

ยงExamples

use intid_core::uint::debug_desc;
assert_eq!(
    debug_desc(3u32).to_string(),
    "3"
);
assert_eq!(
    debug_desc(u32::MAX).to_string(),
    "u32::MAX"
)