Trait sn0int::fmt::Debug 1.0.0[−][src]
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 (libstd
, libcore
, liballoc
, 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
.
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 };
assert_eq!(format!("The origin is: {:#?}", origin),
"The origin is: Point {
x: 0,
y: 0,
}");
Required methods
Formats the value using the given formatter.
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,
)");
Implementations on Foreign Types
1.16.0[src]impl<'_, T, S> Debug for SymmetricDifference<'_, T, S> where
T: Debug + Eq + Hash,
S: BuildHasher,
impl<'_, T, S> Debug for SymmetricDifference<'_, T, S> where
T: Debug + Eq + Hash,
S: BuildHasher,
1.16.0[src]impl<'_, T, S> Debug for Difference<'_, T, S> where
T: Debug + Eq + Hash,
S: BuildHasher,
impl<'_, T, S> Debug for Difference<'_, T, S> where
T: Debug + Eq + Hash,
S: BuildHasher,
1.16.0[src]impl<'_, T, S> Debug for Intersection<'_, T, S> where
T: Debug + Eq + Hash,
S: BuildHasher,
impl<'_, T, S> Debug for Intersection<'_, T, S> where
T: Debug + Eq + Hash,
S: BuildHasher,
1.9.0[src]impl<I, U, F> Debug for FlatMap<I, U, F> where
I: Debug,
U: IntoIterator,
<U as IntoIterator>::IntoIter: Debug,
impl<I, U, F> Debug for FlatMap<I, U, F> where
I: Debug,
U: IntoIterator,
<U as IntoIterator>::IntoIter: Debug,
impl<DB> Debug for RawBytesBindCollector<DB> where
DB: Debug + Backend + TypeMetadata,
<DB as TypeMetadata>::TypeMetadata: Debug,
impl<DB> Debug for RawBytesBindCollector<DB> where
DB: Debug + Backend + TypeMetadata,
<DB as TypeMetadata>::TypeMetadata: Debug,
impl<'a, T, DB> Debug for DebugQuery<'a, T, DB> where
T: QueryFragment<DB>,
DB: Backend,
<DB as Backend>::QueryBuilder: Default,
impl<'a, T, DB> Debug for DebugQuery<'a, T, DB> where
T: QueryFragment<DB>,
DB: Backend,
<DB as Backend>::QueryBuilder: Default,
The Debug
output of the naive date d
is the same as
d.format("%Y-%m-%d")
.
The string printed can be readily parsed via the parse
method on str
.
Example
use chrono::NaiveDate;
assert_eq!(format!("{:?}", NaiveDate::from_ymd(2015, 9, 5)), "2015-09-05");
assert_eq!(format!("{:?}", NaiveDate::from_ymd( 0, 1, 1)), "0000-01-01");
assert_eq!(format!("{:?}", NaiveDate::from_ymd(9999, 12, 31)), "9999-12-31");
ISO 8601 requires an explicit sign for years before 1 BCE or after 9999 CE.
assert_eq!(format!("{:?}", NaiveDate::from_ymd( -1, 1, 1)), "-0001-01-01");
assert_eq!(format!("{:?}", NaiveDate::from_ymd(10000, 12, 31)), "+10000-12-31");
The Debug
output of the naive time t
is the same as
t.format("%H:%M:%S%.f")
.
The string printed can be readily parsed via the parse
method on str
.
It should be noted that, for leap seconds not on the minute boundary, it may print a representation not distinguishable from non-leap seconds. This doesn’t matter in practice, since such leap seconds never happened. (By the time of the first leap second on 1972-06-30, every time zone offset around the world has standardized to the 5-minute alignment.)
Example
use chrono::NaiveTime;
assert_eq!(format!("{:?}", NaiveTime::from_hms(23, 56, 4)), "23:56:04");
assert_eq!(format!("{:?}", NaiveTime::from_hms_milli(23, 56, 4, 12)), "23:56:04.012");
assert_eq!(format!("{:?}", NaiveTime::from_hms_micro(23, 56, 4, 1234)), "23:56:04.001234");
assert_eq!(format!("{:?}", NaiveTime::from_hms_nano(23, 56, 4, 123456)), "23:56:04.000123456");
Leap seconds may also be used.
assert_eq!(format!("{:?}", NaiveTime::from_hms_milli(6, 59, 59, 1_500)), "06:59:60.500");
The Debug
output of the naive date and time dt
is the same as
dt.format("%Y-%m-%dT%H:%M:%S%.f")
.
The string printed can be readily parsed via the parse
method on str
.
It should be noted that, for leap seconds not on the minute boundary, it may print a representation not distinguishable from non-leap seconds. This doesn’t matter in practice, since such leap seconds never happened. (By the time of the first leap second on 1972-06-30, every time zone offset around the world has standardized to the 5-minute alignment.)
Example
use chrono::NaiveDate;
let dt = NaiveDate::from_ymd(2016, 11, 15).and_hms(7, 39, 24);
assert_eq!(format!("{:?}", dt), "2016-11-15T07:39:24");
Leap seconds may also be used.
let dt = NaiveDate::from_ymd(2015, 6, 30).and_hms_milli(23, 59, 59, 1_500);
assert_eq!(format!("{:?}", dt), "2015-06-30T23:59:60.500");
The Debug
output of the ISO week w
is the same as
d.format("%G-W%V")
where d
is any NaiveDate
value in that week.
Example
use chrono::{NaiveDate, Datelike};
assert_eq!(format!("{:?}", NaiveDate::from_ymd(2015, 9, 5).iso_week()), "2015-W36");
assert_eq!(format!("{:?}", NaiveDate::from_ymd( 0, 1, 3).iso_week()), "0000-W01");
assert_eq!(format!("{:?}", NaiveDate::from_ymd(9999, 12, 31).iso_week()), "9999-W52");
ISO 8601 requires an explicit sign for years before 1 BCE or after 9999 CE.
assert_eq!(format!("{:?}", NaiveDate::from_ymd( 0, 1, 2).iso_week()), "-0001-W52");
assert_eq!(format!("{:?}", NaiveDate::from_ymd(10000, 12, 31).iso_week()), "+10000-W52");
impl Debug for __c_anonymous_sockaddr_can_tp
impl Debug for __c_anonymous_sockaddr_can_tp
impl Debug for __c_anonymous_sockaddr_can_j1939
impl Debug for __c_anonymous_sockaddr_can_j1939
impl Debug for posix_spawn_file_actions_t
impl Debug for posix_spawn_file_actions_t
impl<'_, T> Debug for ScopedJoinHandle<'_, T>
impl<'_, T> Debug for ScopedJoinHandle<'_, T>
impl<'scope, 'env> Debug for ScopedThreadBuilder<'scope, 'env>
impl<'scope, 'env> Debug for ScopedThreadBuilder<'scope, 'env>
impl Debug for ImageAlpha64RuntimeFunctionEntry
impl Debug for ImageAlpha64RuntimeFunctionEntry
impl Debug for ImageArm64RuntimeFunctionEntry
impl Debug for ImageArm64RuntimeFunctionEntry
impl<E> Debug for I16Bytes<E> where
E: Endian,
impl<E> Debug for I16Bytes<E> where
E: Endian,
impl<E> Debug for I32Bytes<E> where
E: Endian,
impl<E> Debug for I32Bytes<E> where
E: Endian,
impl<E> Debug for U64Bytes<E> where
E: Endian,
impl<E> Debug for U64Bytes<E> where
E: Endian,
impl<E> Debug for I64Bytes<E> where
E: Endian,
impl<E> Debug for I64Bytes<E> where
E: Endian,
impl Debug for ImageAlphaRuntimeFunctionEntry
impl Debug for ImageAlphaRuntimeFunctionEntry
impl Debug for ImageResourceDirectoryString
impl Debug for ImageResourceDirectoryString
impl Debug for ImageLoadConfigDirectory32
impl Debug for ImageLoadConfigDirectory32
impl<'data, 'file, Elf, R> Debug for ElfSectionRelocationIterator<'data, 'file, Elf, R> where
R: ReadRef<'data>,
Elf: FileHeader,
impl<'data, 'file, Elf, R> Debug for ElfSectionRelocationIterator<'data, 'file, Elf, R> where
R: ReadRef<'data>,
Elf: FileHeader,
impl<'data, 'file, R> Debug for Section<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for Section<'data, 'file, R> where
R: ReadRef<'data>,
impl Debug for ImageArmRuntimeFunctionEntry
impl Debug for ImageArmRuntimeFunctionEntry
impl<E> Debug for U16Bytes<E> where
E: Endian,
impl<E> Debug for U16Bytes<E> where
E: Endian,
impl Debug for ImageArchiveMemberHeader
impl Debug for ImageArchiveMemberHeader
impl Debug for ImageSeparateDebugHeader
impl Debug for ImageSeparateDebugHeader
impl<'data, 'file, Mach, R> Debug for MachOSectionIterator<'data, 'file, Mach, R> where
R: ReadRef<'data>,
Mach: MachHeader,
impl<'data, 'file, Mach, R> Debug for MachOSectionIterator<'data, 'file, Mach, R> where
R: ReadRef<'data>,
Mach: MachHeader,
impl<'data, 'file, R> Debug for Comdat<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for Comdat<'data, 'file, R> where
R: ReadRef<'data>,
impl Debug for ImageResourceDirectoryEntry
impl Debug for ImageResourceDirectoryEntry
impl Debug for ImageDynamicRelocation32V2
impl Debug for ImageDynamicRelocation32V2
impl Debug for ImageDynamicRelocation32
impl Debug for ImageDynamicRelocation32
impl<'data, 'file, Elf, R> Debug for ElfSymbolIterator<'data, 'file, Elf, R> where
R: ReadRef<'data>,
Elf: FileHeader,
impl<'data, 'file, Elf, R> Debug for ElfSymbolIterator<'data, 'file, Elf, R> where
R: ReadRef<'data>,
Elf: FileHeader,
impl Debug for ImageEpilogueDynamicRelocationHeader
impl Debug for ImageEpilogueDynamicRelocationHeader
impl Debug for ImageLoadConfigCodeIntegrity
impl Debug for ImageLoadConfigCodeIntegrity
impl Debug for ImageDelayloadDescriptor
impl Debug for ImageDelayloadDescriptor
impl<'data, 'file, Elf, R> Debug for ElfDynamicRelocationIterator<'data, 'file, Elf, R> where
R: ReadRef<'data>,
Elf: FileHeader,
impl<'data, 'file, Elf, R> Debug for ElfDynamicRelocationIterator<'data, 'file, Elf, R> where
R: ReadRef<'data>,
Elf: FileHeader,
impl<'data, 'file, Mach, R> Debug for MachOSymbolIterator<'data, 'file, Mach, R> where
R: ReadRef<'data>,
Mach: MachHeader,
impl<'data, 'file, Mach, R> Debug for MachOSymbolIterator<'data, 'file, Mach, R> where
R: ReadRef<'data>,
Mach: MachHeader,
impl Debug for ImageAuxSymbolFunctionBeginEnd
impl Debug for ImageAuxSymbolFunctionBeginEnd
impl Debug for ImagePrologueDynamicRelocationHeader
impl Debug for ImagePrologueDynamicRelocationHeader
impl Debug for ImageLoadConfigDirectory64
impl Debug for ImageLoadConfigDirectory64
impl<'data> Debug for ArchiveMember<'data>
impl<'data> Debug for ArchiveMember<'data>
impl Debug for ImageDynamicRelocation64
impl Debug for ImageDynamicRelocation64
impl<'data> Debug for ObjectMapEntry<'data>
impl<'data> Debug for ObjectMapEntry<'data>
impl<'data> Debug for CompressedData<'data>
impl<'data> Debug for CompressedData<'data>
impl Debug for ImageDynamicRelocationTable
impl Debug for ImageDynamicRelocationTable
impl<'data, 'file, R> Debug for CoffSymbolIterator<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for CoffSymbolIterator<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data> Debug for SymbolMapName<'data>
impl<'data> Debug for SymbolMapName<'data>
impl Debug for NoDynamicRelocationIterator
impl Debug for NoDynamicRelocationIterator
impl<E> Debug for U32Bytes<E> where
E: Endian,
impl<E> Debug for U32Bytes<E> where
E: Endian,
impl Debug for ImageRuntimeFunctionEntry
impl Debug for ImageRuntimeFunctionEntry
impl Debug for ImageDynamicRelocation64V2
impl Debug for ImageDynamicRelocation64V2
impl Debug for ImageBoundImportDescriptor
impl Debug for ImageBoundImportDescriptor
impl<'data> Debug for SectionTable<'data>
impl<'data> Debug for SectionTable<'data>
impl<'data, 'file, R> Debug for CoffRelocationIterator<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for CoffRelocationIterator<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for Segment<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for Segment<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, Mach, R> Debug for MachORelocationIterator<'data, 'file, Mach, R> where
R: ReadRef<'data>,
Mach: MachHeader,
impl<'data, 'file, Mach, R> Debug for MachORelocationIterator<'data, 'file, Mach, R> where
R: ReadRef<'data>,
Mach: MachHeader,
impl<'data, 'file, R> Debug for Symbol<'data, 'file, R> where
R: ReadRef<'data>,
impl<'data, 'file, R> Debug for Symbol<'data, 'file, R> where
R: ReadRef<'data>,
impl<'h, 'n> Debug for FindIter<'h, 'n>
impl<'h, 'n> Debug for FindIter<'h, 'n>
impl<'h, 'n> Debug for FindRevIter<'h, 'n>
impl<'h, 'n> Debug for FindRevIter<'h, 'n>
impl<T, B> Debug for Connection<T, B> where
T: AsyncRead + AsyncWrite + Debug + Send + 'static,
B: Payload + 'static,
impl<T, B> Debug for Connection<T, B> where
T: AsyncRead + AsyncWrite + Debug + Send + 'static,
B: Payload + 'static,
impl<A, F> Debug for LoopFn<A, F> where
A: Debug + IntoFuture,
F: Debug,
<A as IntoFuture>::Future: Debug,
impl<A, F> Debug for LoopFn<A, F> where
A: Debug + IntoFuture,
F: Debug,
<A as IntoFuture>::Future: Debug,
impl<I> Debug for JoinAll<I> where
I: IntoIterator,
<I as IntoIterator>::Item: IntoFuture,
<<I as IntoIterator>::Item as IntoFuture>::Future: Debug,
<<I as IntoIterator>::Item as IntoFuture>::Item: Debug,
impl<I> Debug for JoinAll<I> where
I: IntoIterator,
<I as IntoIterator>::Item: IntoFuture,
<<I as IntoIterator>::Item as IntoFuture>::Future: Debug,
<<I as IntoIterator>::Item as IntoFuture>::Item: Debug,
impl<S, F, U> Debug for AndThen<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for AndThen<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<A, B, C, D, E> Debug for Join5<A, B, C, D, E> where
C: Future<Error = <A as Future>::Error> + Debug,
D: Future<Error = <A as Future>::Error> + Debug,
A: Future + Debug,
E: Future<Error = <A as Future>::Error> + Debug,
B: Future<Error = <A as Future>::Error> + Debug,
<A as Future>::Item: Debug,
<B as Future>::Item: Debug,
<C as Future>::Item: Debug,
<D as Future>::Item: Debug,
<E as Future>::Item: Debug,
impl<A, B, C, D, E> Debug for Join5<A, B, C, D, E> where
C: Future<Error = <A as Future>::Error> + Debug,
D: Future<Error = <A as Future>::Error> + Debug,
A: Future + Debug,
E: Future<Error = <A as Future>::Error> + Debug,
B: Future<Error = <A as Future>::Error> + Debug,
<A as Future>::Item: Debug,
<B as Future>::Item: Debug,
<C as Future>::Item: Debug,
<D as Future>::Item: Debug,
<E as Future>::Item: Debug,
impl<A> Debug for Flatten<A> where
A: Future + Debug,
<A as Future>::Item: IntoFuture,
<<A as IntoFuture>::Item as IntoFuture>::Future: Debug,
impl<A> Debug for Flatten<A> where
A: Future + Debug,
<A as Future>::Item: IntoFuture,
<<A as IntoFuture>::Item as IntoFuture>::Future: Debug,
impl<A, B, C, D> Debug for Join4<A, B, C, D> where
C: Future<Error = <A as Future>::Error> + Debug,
D: Future<Error = <A as Future>::Error> + Debug,
A: Future + Debug,
B: Future<Error = <A as Future>::Error> + Debug,
<A as Future>::Item: Debug,
<B as Future>::Item: Debug,
<C as Future>::Item: Debug,
<D as Future>::Item: Debug,
impl<A, B, C, D> Debug for Join4<A, B, C, D> where
C: Future<Error = <A as Future>::Error> + Debug,
D: Future<Error = <A as Future>::Error> + Debug,
A: Future + Debug,
B: Future<Error = <A as Future>::Error> + Debug,
<A as Future>::Item: Debug,
<B as Future>::Item: Debug,
<C as Future>::Item: Debug,
<D as Future>::Item: Debug,
impl<S> Debug for BufferUnordered<S> where
S: Stream + Debug,
<S as Stream>::Item: IntoFuture,
<<S as Stream>::Item as IntoFuture>::Future: Debug,
impl<S> Debug for BufferUnordered<S> where
S: Stream + Debug,
<S as Stream>::Item: IntoFuture,
<<S as Stream>::Item as IntoFuture>::Future: Debug,
impl<T, F, Fut> Debug for Unfold<T, F, Fut> where
T: Debug,
F: Debug,
Fut: Debug + IntoFuture,
<Fut as IntoFuture>::Future: Debug,
impl<T, F, Fut> Debug for Unfold<T, F, Fut> where
T: Debug,
F: Debug,
Fut: Debug + IntoFuture,
<Fut as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for OrElse<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for OrElse<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<F, R> Debug for Lazy<F, R> where
F: Debug,
R: Debug + IntoFuture,
<R as IntoFuture>::Future: Debug,
impl<F, R> Debug for Lazy<F, R> where
F: Debug,
R: Debug + IntoFuture,
<R as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for Then<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for Then<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for ForEach<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<S, F, U> Debug for ForEach<S, F, U> where
S: Debug,
F: Debug,
U: Debug + IntoFuture,
<U as IntoFuture>::Future: Debug,
impl<'_, T, S1, S2> Debug for SymmetricDifference<'_, T, S1, S2> where
T: Debug + Eq + Hash,
S1: BuildHasher,
S2: BuildHasher,
impl<'_, T, S1, S2> Debug for SymmetricDifference<'_, T, S1, S2> where
T: Debug + Eq + Hash,
S1: BuildHasher,
S2: BuildHasher,
impl<'headers, 'buf> Debug for Request<'headers, 'buf> where
'buf: 'headers,
impl<'headers, 'buf> Debug for Request<'headers, 'buf> where
'buf: 'headers,
impl<'headers, 'buf> Debug for Response<'headers, 'buf> where
'buf: 'headers,
impl<'headers, 'buf> Debug for Response<'headers, 'buf> where
'buf: 'headers,
impl<'scope, 'env> Debug for ScopedThreadBuilder<'scope, 'env> where
'env: 'scope,
impl<'scope, 'env> Debug for ScopedThreadBuilder<'scope, 'env> where
'env: 'scope,
impl<'scope, T> Debug for ScopedJoinHandle<'scope, T>
impl<'scope, T> Debug for ScopedJoinHandle<'scope, T>
impl Debug for CertificateStatusRequest
impl Debug for CertificateStatusRequest
impl Debug for CertificateRequestPayload
impl Debug for CertificateRequestPayload
impl Debug for NewSessionTicketExtension
impl Debug for NewSessionTicketExtension
impl Debug for OCSPCertificateStatusRequest
impl Debug for OCSPCertificateStatusRequest
impl Debug for ServerKeyExchangePayload
impl Debug for ServerKeyExchangePayload
impl Debug for CertificateRequestPayloadTLS13
impl Debug for CertificateRequestPayloadTLS13
impl Debug for NewSessionTicketPayloadTLS13
impl Debug for NewSessionTicketPayloadTLS13
impl<R, Rsdr> Debug for ReseedingRng<R, Rsdr> where
R: Debug + BlockRngCore + SeedableRng,
Rsdr: Debug + RngCore,
impl<R, Rsdr> Debug for ReseedingRng<R, Rsdr> where
R: Debug + BlockRngCore + SeedableRng,
Rsdr: Debug + RngCore,
impl<X> Debug for Uniform<X> where
X: Debug + SampleUniform,
<X as SampleUniform>::Sampler: Debug,
impl<X> Debug for Uniform<X> where
X: Debug + SampleUniform,
<X as SampleUniform>::Sampler: Debug,
impl<X> Debug for WeightedIndex<X> where
X: Debug + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Debug,
impl<X> Debug for WeightedIndex<X> where
X: Debug + SampleUniform + PartialOrd<X>,
<X as SampleUniform>::Sampler: Debug,
impl<'text> Debug for InitialInfo<'text>
impl<'text> Debug for InitialInfo<'text>
Debug the serialization of this URL.
impl Debug for Style
impl Debug for Style
Styles have a special Debug
implementation that only shows the fields that
are set. Fields that haven’t been touched aren’t included in the output.
This behaviour gets bypassed when using the alternate formatting mode
format!("{:#?}")
.
use ansi_term::Colour::{Red, Blue};
assert_eq!("Style { fg(Red), on(Blue), bold, italic }",
format!("{:?}", Red.on(Blue).bold().italic()));