Skip to content

Commit 5fc6fc3

Browse files
committed
Improve docs for Formatter
1 parent b8c8f0b commit 5fc6fc3

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/libcore/fmt/mod.rs

+12-3
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,18 @@ impl<W: Write + ?Sized> Write for &mut W {
232232
}
233233
}
234234

235-
/// A struct to represent both where to emit formatting strings to and how they
236-
/// should be formatted. A mutable version of this is passed to all formatting
237-
/// traits.
235+
/// Configuration for formatting.
236+
///
237+
/// A `Formatter` represents various options related to formatting. Users do not
238+
/// construct `Formatter`s directly; a mutable reference to one is passed to
239+
/// the `fmt` method of all formatting traits, like [`Debug`] and [`Display`].
240+
///
241+
/// To interact with a `Formatter`, you'll call various methods to change the
242+
/// various options related to formatting. For examples, please see the
243+
/// documentation of the methods defined on `Formatter` below.
244+
///
245+
/// [`Debug`]: trait.Debug.html
246+
/// [`Display`]: trait.Display.html
238247
#[allow(missing_debug_implementations)]
239248
#[stable(feature = "rust1", since = "1.0.0")]
240249
pub struct Formatter<'a> {

0 commit comments

Comments
 (0)