diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2019-01-08 15:44:57 -0500 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2019-01-09 14:46:42 -0500 |
| commit | 5fc6fc3d90b32c504b3ffe1802e48987cb7a7e64 (patch) | |
| tree | 94ec8cc3e3aa646b0640ed8e83644d214b370ba6 | |
| parent | b8c8f0bdf62728198696cab7d00a8fdc3ee381d3 (diff) | |
| download | rust-5fc6fc3d90b32c504b3ffe1802e48987cb7a7e64.tar.gz rust-5fc6fc3d90b32c504b3ffe1802e48987cb7a7e64.zip | |
Improve docs for Formatter
| -rw-r--r-- | src/libcore/fmt/mod.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index ec1aeb8a7d1..06cb1b02fcf 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -232,9 +232,18 @@ impl<W: Write + ?Sized> Write for &mut W { } } -/// A struct to represent both where to emit formatting strings to and how they -/// should be formatted. A mutable version of this is passed to all formatting -/// traits. +/// Configuration for formatting. +/// +/// A `Formatter` represents various options related to formatting. Users do not +/// construct `Formatter`s directly; a mutable reference to one is passed to +/// the `fmt` method of all formatting traits, like [`Debug`] and [`Display`]. +/// +/// To interact with a `Formatter`, you'll call various methods to change the +/// various options related to formatting. For examples, please see the +/// documentation of the methods defined on `Formatter` below. +/// +/// [`Debug`]: trait.Debug.html +/// [`Display`]: trait.Display.html #[allow(missing_debug_implementations)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Formatter<'a> { |
