pub trait Debug {
// Required method
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
}
Expand description
?
formatting.
Debug
should format the output in a programmer-facing, debugging context.
Generally speaking, you should just derive
a Debug
implementation.
When used with the alternate format specifier #?
, the output is pretty-printed.
For more information on formatters, see the module-level documentation.
This trait can be used with #[derive]
if all fields implement Debug
. When
derive
d for structs, it will use the name of the struct
, then {
, then a
comma-separated list of each field’s name and Debug
value, then }
. For
enum
s, it will use the name of the variant and, if applicable, (
, then the
Debug
values of the fields, then )
.
§Stability
Derived Debug
formats are not stable, and so may change with future Rust
versions. Additionally, Debug
implementations of types provided by the
standard library (std
, core
, alloc
, etc.) are not stable, and
may also change with future Rust versions.
§Examples
Deriving an implementation:
#[derive(Debug)]
struct Point {
x: i32,
y: i32,
}
let origin = Point { x: 0, y: 0 };
assert_eq!(
format!("The origin is: {origin:?}"),
"The origin is: Point { x: 0, y: 0 }",
);
Manually implementing:
use std::fmt;
struct Point {
x: i32,
y: i32,
}
impl fmt::Debug for Point {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Point")
.field("x", &self.x)
.field("y", &self.y)
.finish()
}
}
let origin = Point { x: 0, y: 0 };
assert_eq!(
format!("The origin is: {origin:?}"),
"The origin is: Point { x: 0, y: 0 }",
);
There are a number of helper methods on the Formatter
struct to help you with manual
implementations, such as debug_struct
.
Types that do not wish to use the standard suite of debug representations
provided by the Formatter
trait (debug_struct
, debug_tuple
,
debug_list
, debug_set
, debug_map
) can do something totally custom by
manually writing an arbitrary representation to the Formatter
.
impl fmt::Debug for Point {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Point [{} {}]", self.x, self.y)
}
}
Debug
implementations using either derive
or the debug builder API
on Formatter
support pretty-printing using the alternate flag: {:#?}
.
Pretty-printing with #?
:
#[derive(Debug)]
struct Point {
x: i32,
y: i32,
}
let origin = Point { x: 0, y: 0 };
let expected = "The origin is: Point {
x: 0,
y: 0,
}";
assert_eq!(format!("The origin is: {origin:#?}"), expected);
Required Methods§
1.0.0 · sourcefn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the given formatter.
§Errors
This function should return Err
if, and only if, the provided Formatter
returns Err
.
String formatting is considered an infallible operation; this function only
returns a Result
because writing to the underlying stream might fail and it must
provide a way to propagate the fact that an error has occurred back up the stack.
§Examples
use std::fmt;
struct Position {
longitude: f32,
latitude: f32,
}
impl fmt::Debug for Position {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("")
.field(&self.longitude)
.field(&self.latitude)
.finish()
}
}
let position = Position { longitude: 1.987, latitude: 2.983 };
assert_eq!(format!("{position:?}"), "(1.987, 2.983)");
assert_eq!(format!("{position:#?}"), "(
1.987,
2.983,
)");
Implementors§
impl Debug for c_void
impl Debug for DIR
impl Debug for FILE
impl Debug for fpos_t
impl Debug for timezone
impl Debug for fpos64_t
impl Debug for tpacket_versions
impl Debug for libc::prelude::fmt::Alignment
impl Debug for AsciiChar
impl Debug for core::cmp::Ordering
impl Debug for Infallible
impl Debug for IpAddr
impl Debug for Ipv6MulticastScope
impl Debug for SocketAddr
impl Debug for FpCategory
impl Debug for IntErrorKind
impl Debug for SearchStep
impl Debug for core::sync::atomic::Ordering
impl Debug for bool
impl Debug for char
impl Debug for f16
impl Debug for f32
impl Debug for f64
impl Debug for f128
impl Debug for i8
impl Debug for i16
impl Debug for i32
impl Debug for i64
impl Debug for i128
impl Debug for isize
impl Debug for !
impl Debug for str
impl Debug for u8
impl Debug for u16
impl Debug for u32
impl Debug for u64
impl Debug for u128
impl Debug for ()
impl Debug for usize
impl Debug for termios2
impl Debug for msqid_ds
impl Debug for semid_ds
impl Debug for sigset_t
impl Debug for sysinfo
impl Debug for statvfs
impl Debug for _libc_fpstate
impl Debug for _libc_fpxreg
impl Debug for _libc_xmmreg
impl Debug for clone_args
impl Debug for flock64
impl Debug for flock
impl Debug for ipc_perm
impl Debug for mcontext_t
impl Debug for pthread_attr_t
impl Debug for ptrace_rseq_configuration
impl Debug for shmid_ds
impl Debug for sigaction
impl Debug for siginfo_t
impl Debug for stack_t
impl Debug for stat64
impl Debug for stat
impl Debug for statfs64
impl Debug for statfs
impl Debug for statvfs64
impl Debug for ucontext_t
impl Debug for user
impl Debug for user_fpregs_struct
impl Debug for user_regs_struct
impl Debug for Elf32_Chdr
impl Debug for Elf64_Chdr
impl Debug for __c_anonymous_ptrace_syscall_info_entry
impl Debug for __c_anonymous_ptrace_syscall_info_exit
impl Debug for __c_anonymous_ptrace_syscall_info_seccomp
impl Debug for __exit_status
impl Debug for __timeval
impl Debug for aiocb
impl Debug for cmsghdr
impl Debug for fanotify_event_info_error
impl Debug for fanotify_event_info_pidfd
impl Debug for glob64_t
impl Debug for iocb
impl Debug for mallinfo2
impl Debug for mallinfo
impl Debug for msghdr
impl Debug for nl_mmap_hdr
impl Debug for nl_mmap_req
impl Debug for nl_pktinfo
impl Debug for ntptimeval
impl Debug for ptrace_peeksiginfo_args
impl Debug for ptrace_syscall_info
impl Debug for regex_t
impl Debug for rtentry
impl Debug for sem_t
impl Debug for seminfo
impl Debug for sockaddr_xdp
impl Debug for tcp_info
impl Debug for termios
impl Debug for timex
impl Debug for utmpx
impl Debug for xdp_desc
impl Debug for xdp_mmap_offsets
impl Debug for xdp_mmap_offsets_v1
impl Debug for xdp_options
impl Debug for xdp_ring_offset
impl Debug for xdp_ring_offset_v1
impl Debug for xdp_statistics
impl Debug for xdp_statistics_v1
impl Debug for xdp_umem_reg
impl Debug for xdp_umem_reg_v1
impl Debug for Elf32_Ehdr
impl Debug for Elf32_Phdr
impl Debug for Elf32_Shdr
impl Debug for Elf32_Sym
impl Debug for Elf64_Ehdr
impl Debug for Elf64_Phdr
impl Debug for Elf64_Shdr
impl Debug for Elf64_Sym
impl Debug for __c_anonymous__kernel_fsid_t
impl Debug for __c_anonymous_elf32_rel
impl Debug for __c_anonymous_elf32_rela
impl Debug for __c_anonymous_elf64_rel
impl Debug for __c_anonymous_elf64_rela
impl Debug for __c_anonymous_ifru_map
impl Debug for __c_anonymous_sockaddr_can_j1939
impl Debug for __c_anonymous_sockaddr_can_tp
impl Debug for af_alg_iv
impl Debug for arpd_request
impl Debug for can_filter
impl Debug for cpu_set_t
impl Debug for dirent64
impl Debug for dirent
impl Debug for dl_phdr_info
impl Debug for dqblk
impl Debug for epoll_params
impl Debug for fanotify_event_info_fid
impl Debug for fanotify_event_info_header
impl Debug for fanotify_event_metadata
impl Debug for fanotify_response
impl Debug for fanout_args
impl Debug for ff_condition_effect
impl Debug for ff_constant_effect
impl Debug for ff_effect
impl Debug for ff_envelope
impl Debug for ff_periodic_effect
impl Debug for ff_ramp_effect
impl Debug for ff_replay
impl Debug for ff_rumble_effect
impl Debug for ff_trigger
impl Debug for file_clone_range
impl Debug for fsid_t
impl Debug for genlmsghdr
impl Debug for glob_t
impl Debug for hwtstamp_config
impl Debug for if_nameindex
impl Debug for ifconf
impl Debug for ifreq
impl Debug for in6_ifreq
impl Debug for in6_pktinfo
impl Debug for inotify_event
impl Debug for input_absinfo
impl Debug for input_event
impl Debug for input_id
impl Debug for input_keymap_entry
impl Debug for input_mask
impl Debug for itimerspec
impl Debug for iw_discarded
impl Debug for iw_encode_ext
impl Debug for iw_event
impl Debug for iw_freq
impl Debug for iw_michaelmicfailure
impl Debug for iw_missed
impl Debug for iw_mlme
impl Debug for iw_param
impl Debug for iw_pmkid_cand
impl Debug for iw_pmksa
impl Debug for iw_point
impl Debug for iw_priv_args
impl Debug for iw_quality
impl Debug for iw_range
impl Debug for iw_scan_req
impl Debug for iw_statistics
impl Debug for iw_thrspy
impl Debug for iwreq
impl Debug for j1939_filter
impl Debug for mntent
impl Debug for mount_attr
impl Debug for mq_attr
impl Debug for msginfo
impl Debug for nlattr
impl Debug for nlmsgerr
impl Debug for nlmsghdr
impl Debug for open_how
impl Debug for option
impl Debug for packet_mreq
impl Debug for passwd
impl Debug for posix_spawn_file_actions_t
impl Debug for posix_spawnattr_t
impl Debug for pthread_barrier_t
impl Debug for pthread_barrierattr_t
impl Debug for pthread_cond_t
impl Debug for pthread_condattr_t
impl Debug for pthread_mutex_t
impl Debug for pthread_mutexattr_t
impl Debug for pthread_rwlock_t
impl Debug for pthread_rwlockattr_t
impl Debug for ptp_clock_caps
impl Debug for ptp_clock_time
impl Debug for ptp_extts_event
impl Debug for ptp_extts_request
impl Debug for ptp_pin_desc
impl Debug for ptp_sys_offset
impl Debug for ptp_sys_offset_extended
impl Debug for ptp_sys_offset_precise
impl Debug for regmatch_t
impl Debug for rlimit64
impl Debug for sched_attr
impl Debug for sctp_authinfo
impl Debug for sctp_initmsg
impl Debug for sctp_nxtinfo
impl Debug for sctp_prinfo
impl Debug for sctp_rcvinfo
impl Debug for sctp_sndinfo
impl Debug for sctp_sndrcvinfo
impl Debug for seccomp_data
impl Debug for seccomp_notif
impl Debug for seccomp_notif_addfd
impl Debug for seccomp_notif_resp
impl Debug for seccomp_notif_sizes
impl Debug for sembuf
impl Debug for signalfd_siginfo
impl Debug for sock_extended_err
impl Debug for sock_filter
impl Debug for sock_fprog
impl Debug for sockaddr_alg
impl Debug for sockaddr_nl
impl Debug for sockaddr_pkt
impl Debug for sockaddr_vm
impl Debug for spwd
impl Debug for tls12_crypto_info_aes_gcm_128
impl Debug for tls12_crypto_info_aes_gcm_256
impl Debug for tls12_crypto_info_chacha20_poly1305
impl Debug for tls_crypto_info
impl Debug for tpacket2_hdr
impl Debug for tpacket3_hdr
impl Debug for tpacket_auxdata
impl Debug for tpacket_bd_ts
impl Debug for tpacket_hdr
impl Debug for tpacket_hdr_v1
impl Debug for tpacket_hdr_variant1
impl Debug for tpacket_req3
impl Debug for tpacket_req
impl Debug for tpacket_rollover_stats
impl Debug for tpacket_stats
impl Debug for tpacket_stats_v3
impl Debug for ucred
impl Debug for uinput_abs_setup
impl Debug for uinput_ff_erase
impl Debug for uinput_ff_upload
impl Debug for uinput_setup
impl Debug for uinput_user_dev
impl Debug for xsk_tx_metadata_completion
impl Debug for xsk_tx_metadata_request
impl Debug for Dl_info
impl Debug for addrinfo
impl Debug for arphdr
impl Debug for arpreq
impl Debug for arpreq_old
impl Debug for epoll_event
impl Debug for fd_set
impl Debug for ifaddrs
impl Debug for in6_rtmsg
impl Debug for in_addr
impl Debug for in_pktinfo
impl Debug for ip_mreq
impl Debug for ip_mreq_source
impl Debug for ip_mreqn
impl Debug for lconv
impl Debug for mmsghdr
impl Debug for sched_param
impl Debug for sigevent
impl Debug for sockaddr
impl Debug for sockaddr_in6
impl Debug for sockaddr_in
impl Debug for sockaddr_ll
impl Debug for sockaddr_storage
impl Debug for sockaddr_un
impl Debug for statx
impl Debug for statx_timestamp
impl Debug for tm
impl Debug for utsname
impl Debug for group
impl Debug for hostent
impl Debug for in6_addr
impl Debug for iovec
impl Debug for ipv6_mreq
impl Debug for itimerval
impl Debug for linger
impl Debug for pollfd
impl Debug for protoent
impl Debug for rlimit
impl Debug for rusage
impl Debug for servent
impl Debug for sigval
impl Debug for timespec
impl Debug for timeval
impl Debug for tms
impl Debug for utimbuf
impl Debug for winsize
impl Debug for SipHasher
impl Debug for Assume
impl Debug for Layout
impl Debug for LayoutError
impl Debug for AllocError
impl Debug for TypeId
impl Debug for TryFromSliceError
impl Debug for core::ascii::EscapeDefault
impl Debug for BorrowError
impl Debug for BorrowMutError
impl Debug for CharTryFromError
impl Debug for ParseCharError
impl Debug for DecodeUtf16Error
impl Debug for core::char::EscapeDebug
impl Debug for core::char::EscapeDefault
impl Debug for core::char::EscapeUnicode
impl Debug for ToLowercase
impl Debug for ToUppercase
impl Debug for TryFromCharError
impl Debug for CpuidResult
impl Debug for __m128
impl Debug for __m128bh
impl Debug for __m128d
impl Debug for __m128h
impl Debug for __m128i
impl Debug for __m256
impl Debug for __m256bh
impl Debug for __m256d
impl Debug for __m256h
impl Debug for __m256i
impl Debug for __m512
impl Debug for __m512bh
impl Debug for __m512d
impl Debug for __m512h
impl Debug for __m512i
impl Debug for bf16
impl Debug for CStr
impl Debug for FromBytesUntilNulError
impl Debug for FromBytesWithNulError
impl Debug for BorrowedBuf<'_>
impl Debug for PhantomPinned
impl Debug for Ipv4Addr
impl Debug for Ipv6Addr
impl Debug for AddrParseError
impl Debug for SocketAddrV4
impl Debug for SocketAddrV6
impl Debug for ParseFloatError
impl Debug for ParseIntError
impl Debug for TryFromIntError
impl Debug for RangeFull
impl Debug for PanicMessage<'_>
impl Debug for core::ptr::alignment::Alignment
impl Debug for ParseBoolError
impl Debug for Utf8Error
impl Debug for Chars<'_>
impl Debug for EncodeUtf16<'_>
impl Debug for Utf8Chunks<'_>
impl Debug for AtomicBool
impl Debug for AtomicI8
impl Debug for AtomicI16
impl Debug for AtomicI32
impl Debug for AtomicI64
impl Debug for AtomicIsize
impl Debug for AtomicU8
impl Debug for AtomicU16
impl Debug for AtomicU32
impl Debug for AtomicU64
impl Debug for AtomicUsize
impl Debug for Context<'_>
impl Debug for LocalWaker
impl Debug for RawWaker
impl Debug for RawWakerVTable
impl Debug for Waker
impl Debug for Duration
impl Debug for TryFromFloatSecsError
impl Debug for Arguments<'_>
impl Debug for Error
impl Debug for __c_anonymous_ptrace_syscall_info_data
impl Debug for __c_anonymous_ifc_ifcu
impl Debug for __c_anonymous_ifr_ifru
impl Debug for __c_anonymous_iwreq
impl Debug for __c_anonymous_ptp_perout_request_1
impl Debug for __c_anonymous_ptp_perout_request_2
impl Debug for __c_anonymous_sockaddr_can_can_addr
impl Debug for __c_anonymous_xsk_tx_metadata_union
impl Debug for iwreq_data
impl Debug for tpacket_bd_header_u
impl Debug for tpacket_req_u
impl Debug for dyn Any
impl Debug for dyn Any + Send
impl Debug for dyn Any + Sync + Send
impl<'a> Debug for Request<'a>
impl<'a> Debug for Source<'a>
impl<'a> Debug for core::ffi::c_str::Bytes<'a>
impl<'a> Debug for BorrowedCursor<'a>
impl<'a> Debug for Location<'a>
impl<'a> Debug for PanicInfo<'a>
impl<'a> Debug for EscapeAscii<'a>
impl<'a> Debug for core::str::iter::Bytes<'a>
impl<'a> Debug for CharIndices<'a>
impl<'a> Debug for core::str::iter::EscapeDebug<'a>
impl<'a> Debug for core::str::iter::EscapeDefault<'a>
impl<'a> Debug for core::str::iter::EscapeUnicode<'a>
impl<'a> Debug for Lines<'a>
impl<'a> Debug for LinesAny<'a>
impl<'a> Debug for SplitAsciiWhitespace<'a>
impl<'a> Debug for SplitWhitespace<'a>
impl<'a> Debug for Utf8Chunk<'a>
impl<'a> Debug for CharSearcher<'a>
impl<'a> Debug for ContextBuilder<'a>
impl<'a, 'b> Debug for CharSliceSearcher<'a, 'b>
impl<'a, 'b> Debug for StrSearcher<'a, 'b>
impl<'a, 'b, const N: usize> Debug for CharArrayRefSearcher<'a, 'b, N>
impl<'a, 'f> Debug for VaList<'a, 'f>where
'f: 'a,
impl<'a, A> Debug for core::option::Iter<'a, A>where
A: Debug + 'a,
impl<'a, A> Debug for core::option::IterMut<'a, A>where
A: Debug + 'a,
impl<'a, I> Debug for ByRefSized<'a, I>where
I: Debug,
impl<'a, P> Debug for MatchIndices<'a, P>
impl<'a, P> Debug for Matches<'a, P>
impl<'a, P> Debug for RMatchIndices<'a, P>
impl<'a, P> Debug for RMatches<'a, P>
impl<'a, P> Debug for core::str::iter::RSplit<'a, P>
impl<'a, P> Debug for core::str::iter::RSplitN<'a, P>
impl<'a, P> Debug for RSplitTerminator<'a, P>
impl<'a, P> Debug for core::str::iter::Split<'a, P>
impl<'a, P> Debug for core::str::iter::SplitInclusive<'a, P>
impl<'a, P> Debug for core::str::iter::SplitN<'a, P>
impl<'a, P> Debug for SplitTerminator<'a, P>
impl<'a, T> Debug for core::result::Iter<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for core::result::IterMut<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for Chunks<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for ChunksExact<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for ChunksExactMut<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for ChunksMut<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for RChunks<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for RChunksExact<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for RChunksExactMut<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for RChunksMut<'a, T>where
T: Debug + 'a,
impl<'a, T> Debug for Windows<'a, T>where
T: Debug + 'a,
impl<'a, T, P> Debug for ChunkBy<'a, T, P>where
T: 'a + Debug,
impl<'a, T, P> Debug for ChunkByMut<'a, T, P>where
T: 'a + Debug,
impl<'a, T, const N: usize> Debug for core::slice::iter::ArrayChunks<'a, T, N>where
T: Debug + 'a,
impl<'a, T, const N: usize> Debug for ArrayChunksMut<'a, T, N>where
T: Debug + 'a,
impl<'a, T, const N: usize> Debug for ArrayWindows<'a, T, N>where
T: Debug + 'a,
impl<'a, const N: usize> Debug for CharArraySearcher<'a, N>
impl<'f> Debug for VaListImpl<'f>
impl<A> Debug for Repeat<A>where
A: Debug,
impl<A> Debug for RepeatN<A>where
A: Debug,
impl<A> Debug for core::option::IntoIter<A>where
A: Debug,
impl<A> Debug for IterRange<A>where
A: Debug,
impl<A> Debug for IterRangeFrom<A>where
A: Debug,
impl<A> Debug for IterRangeInclusive<A>where
A: Debug,
impl<A, B> Debug for Chain<A, B>
impl<A, B> Debug for Zip<A, B>
impl<B, C> Debug for ControlFlow<B, C>
impl<Dyn> Debug for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<F> Debug for libc::prelude::iter::FromFn<F>
impl<F> Debug for OnceWith<F>
impl<F> Debug for RepeatWith<F>
impl<F> Debug for PollFn<F>
impl<F> Debug for CharPredicateSearcher<'_, F>
impl<F> Debug for libc::prelude::fmt::FromFn<F>
impl<F> Debug for Fwhere
F: FnPtr,
impl<H> Debug for BuildHasherDefault<H>
impl<I> Debug for Cloned<I>where
I: Debug,
impl<I> Debug for Copied<I>where
I: Debug,
impl<I> Debug for Cycle<I>where
I: Debug,
impl<I> Debug for Enumerate<I>where
I: Debug,
impl<I> Debug for Fuse<I>where
I: Debug,
impl<I> Debug for Intersperse<I>
impl<I> Debug for Peekable<I>
impl<I> Debug for Skip<I>where
I: Debug,
impl<I> Debug for StepBy<I>where
I: Debug,
impl<I> Debug for Take<I>where
I: Debug,
impl<I> Debug for FromIter<I>where
I: Debug,
impl<I> Debug for DecodeUtf16<I>
impl<I, F> Debug for FilterMap<I, F>where
I: Debug,
impl<I, F> Debug for Inspect<I, F>where
I: Debug,
impl<I, F> Debug for Map<I, F>where
I: Debug,
impl<I, F, const N: usize> Debug for MapWindows<I, F, N>
impl<I, G> Debug for IntersperseWith<I, G>
impl<I, P> Debug for Filter<I, P>where
I: Debug,
impl<I, P> Debug for MapWhile<I, P>where
I: Debug,
impl<I, P> Debug for SkipWhile<I, P>where
I: Debug,
impl<I, P> Debug for TakeWhile<I, P>where
I: Debug,
impl<I, St, F> Debug for Scan<I, St, F>
impl<I, U> Debug for Flatten<I>
impl<I, U, F> Debug for FlatMap<I, U, F>
impl<I, const N: usize> Debug for libc::prelude::iter::ArrayChunks<I, N>
impl<Idx> Debug for core::ops::range::Range<Idx>where
Idx: Debug,
impl<Idx> Debug for core::ops::range::RangeFrom<Idx>where
Idx: Debug,
impl<Idx> Debug for core::ops::range::RangeInclusive<Idx>where
Idx: Debug,
impl<Idx> Debug for RangeTo<Idx>where
Idx: Debug,
impl<Idx> Debug for RangeToInclusive<Idx>where
Idx: Debug,
impl<Idx> Debug for core::range::Range<Idx>where
Idx: Debug,
impl<Idx> Debug for core::range::RangeFrom<Idx>where
Idx: Debug,
impl<Idx> Debug for core::range::RangeInclusive<Idx>where
Idx: Debug,
impl<Ptr> Debug for Pin<Ptr>where
Ptr: Debug,
impl<T> Debug for Option<T>where
T: Debug,
impl<T> Debug for Bound<T>where
T: Debug,
impl<T> Debug for Poll<T>where
T: Debug,
impl<T> Debug for *const Twhere
T: ?Sized,
impl<T> Debug for *mut Twhere
T: ?Sized,
impl<T> Debug for &T
impl<T> Debug for &mut T
impl<T> Debug for [T]where
T: Debug,
impl<T> Debug for (T₁, T₂, …, Tₙ)
This trait is implemented for tuples up to twelve items long.