Lines Matching defs:fmt

6533 use std::fmt::Debug;
8879 mod fmt;
11207 use std::fmt::Debug;
12963 use std::fmt::{self, Write};
12967 let s = fmt::format(format_args!("Hello, {}!", "world"));
12976 impl fmt::LowerHex for A {
12977 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12981 impl fmt::UpperHex for B {
12982 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12986 impl fmt::Display for C {
12987 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12991 impl fmt::Binary for D {
12992 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
13059 let a: &dyn fmt::Debug = &1;
13194 // fmt::Write instance.
13237 let s = fmt::format(format_args!("hello {}", "world"));
13954 /// are used; see [`std::fmt`] for more information.
13963 /// [`std::fmt`]: ../std/fmt/index.html
13967 /// [`Display`]: core::fmt::Display
13973 /// since `fmt::Write for String` never returns an error itself.
13987 let res = $crate::fmt::format($crate::__export::format_args!($($arg)*));
15674 use std::fmt::Display;
15714 use std::fmt::Display;
16047 use std::fmt::Display;
16058 use std::fmt::Debug;
16217 use core::fmt;
17909 impl fmt::Display for FromUtf8Error {
17910 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17911 fmt::Display::fmt(&self.error, f)
17916 impl fmt::Display for FromUtf16Error {
17917 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17918 fmt::Display::fmt("invalid utf-16: lone surrogate found", f)
18189 impl fmt::Display for String {
18191 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18192 fmt::Display::fmt(&**self, f)
18197 impl fmt::Debug for String {
18199 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18200 fmt::Debug::fmt(&**self, f)
18411 /// [`Display`]: fmt::Display
18437 /// since `fmt::Write for String` never returns an error itself.
18439 impl<T: fmt::Display + ?Sized> ToString for T {
18446 use fmt::Write;
18687 impl fmt::Write for String {
18689 fn write_str(&mut self, s: &str) -> fmt::Result {
18695 fn write_char(&mut self, c: char) -> fmt::Result {
18720 impl fmt::Debug for Drain<'_> {
18721 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18827 use crate::fmt;
19193 impl<B: ?Sized> fmt::Debug for Cow<'_, B>
19195 B: fmt::Debug + ToOwned<Owned: fmt::Debug>,
19197 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
19199 Borrowed(ref b) => fmt::Debug::fmt(b, f),
19200 Owned(ref o) => fmt::Debug::fmt(o, f),
19206 impl<B: ?Sized> fmt::Display for Cow<'_, B>
19208 B: fmt::Display + ToOwned<Owned: fmt::Display>,
19210 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
19212 Borrowed(ref b) => fmt::Display::fmt(b, f),
19213 Owned(ref o) => fmt::Display::fmt(o, f),
19476 pub mod fmt;
19750 use core::fmt;
21188 impl<T: ?Sized + fmt::Display> fmt::Display for Rc<T> {
21189 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
21190 fmt::Display::fmt(&**self, f)
21195 impl<T: ?Sized + fmt::Debug> fmt::Debug for Rc<T> {
21196 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
21197 fmt::Debug::fmt(&**self, f)
21202 impl<T: ?Sized> fmt::Pointer for Rc<T> {
21203 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
21204 fmt::Pointer::fmt(&(&**self as *const T), f)
21820 impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
21821 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23281 use core::fmt;
23563 impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
23564 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
25505 impl<T: ?Sized + fmt::Display> fmt::Display for Arc<T> {
25506 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
25507 fmt::Display::fmt(&**self, f)
25512 impl<T: ?Sized + fmt::Debug> fmt::Debug for Arc<T> {
25513 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
25514 fmt::Debug::fmt(&**self, f)
25519 impl<T: ?Sized> fmt::Pointer for Arc<T> {
25520 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
25521 fmt::Pointer::fmt(&(&**self as *const T), f)
26125 //! [`fmt::Binary`][`Binary`] trait can then be formatted with `{:b}`. Implementations
26135 //! # use std::fmt;
26137 //! # impl fmt::Display for Foo {
26138 //! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26150 //! Additionally, the return value of this function is [`fmt::Result`] which is a
26151 //! type alias of [`Result`]`<(), `[`std::fmt::Error`]`>`. Formatting implementations
26165 //! use std::fmt;
26173 //! impl fmt::Display for Vector2D {
26174 //! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26184 //! impl fmt::Binary for Vector2D {
26185 //! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26208 //! ### `fmt::Display` vs `fmt::Debug`
26212 //! - [`fmt::Display`][`Display`] implementations assert that the type can be faithfully
26215 //! - [`fmt::Debug`][`Debug`] implementations should be implemented for **all** public types.
26286 //! use std::fmt;
26292 //! fn my_fmt_fn(args: fmt::Arguments) {
26298 //! The result of the [`format_args!`] macro is a value of type [`fmt::Arguments`].
26308 //! [`fmt::Result`]: Result
26310 //! [`std::fmt::Error`]: Error
26323 //! [`fmt::Arguments`]: Arguments
26329 pub use core::fmt::rt;
26331 pub use core::fmt::Alignment;
26333 pub use core::fmt::Error;
26335 pub use core::fmt::{write, ArgumentV1, Arguments};
26337 pub use core::fmt::{Binary, Octal};
26339 pub use core::fmt::{Debug, Display};
26341 pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
26343 pub use core::fmt::{Formatter, Result, Write};
26345 pub use core::fmt::{LowerExp, UpperExp};
26347 pub use core::fmt::{LowerHex, Pointer, UpperHex};
26361 /// use std::fmt;
26363 /// let s = fmt::format(format_args!("Hello, {}!", "world"));
26556 use std::fmt::Display;
26596 use std::fmt::Display;
26821 use std::fmt::Display;
26832 use std::fmt::Debug;
26960 use core::fmt;
27009 impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
27010 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
27039 impl<T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
27040 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
27058 impl<T: fmt::Debug> fmt::Debug for IntoIter<T> {
27059 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
28073 impl<T: fmt::Debug> fmt::Debug for Cursor<'_, T> {
28074 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
28097 impl<T: fmt::Debug> fmt::Debug for CursorMut<'_, T> {
28098 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
28533 impl<T: fmt::Debug, F> fmt::Debug for DrainFilter<'_, T, F>
28537 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
28698 impl<T: fmt::Debug> fmt::Debug for LinkedList<T> {
28699 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
29288 use crate::fmt::Debug;
29795 use core::fmt::{self, Debug};
30078 impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for Iter<'_, K, V> {
30079 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30119 impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IntoIter<K, V> {
30120 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30145 impl<K: fmt::Debug, V> fmt::Debug for Keys<'_, K, V> {
30146 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30163 impl<K, V: fmt::Debug> fmt::Debug for Values<'_, K, V> {
30164 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30181 impl<K, V: fmt::Debug> fmt::Debug for ValuesMut<'_, K, V> {
30182 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30199 impl<K: fmt::Debug, V> fmt::Debug for IntoKeys<K, V> {
30200 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30217 impl<K, V: fmt::Debug> fmt::Debug for IntoValues<K, V> {
30218 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30235 impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for Range<'_, K, V> {
30236 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30256 impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for RangeMut<'_, K, V> {
30257 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
31439 impl<K, V, F> fmt::Debug for DrainFilter<'_, K, V, F>
31441 K: fmt::Debug,
31442 V: fmt::Debug,
31445 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
31800 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32173 use core::fmt::{self, Debug};
32258 impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
32259 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32314 impl<T: fmt::Debug> fmt::Debug for Difference<'_, T> {
32315 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32330 impl<T: fmt::Debug> fmt::Debug for SymmetricDifference<'_, T> {
32331 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32362 impl<T: fmt::Debug> fmt::Debug for Intersection<'_, T> {
32363 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32378 impl<T: fmt::Debug> fmt::Debug for Union<'_, T> {
32379 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33279 impl<T, F> fmt::Debug for DrainFilter<'_, T, F>
33281 T: fmt::Debug,
33284 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33439 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35046 use core::fmt::{self, Debug};
35074 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35096 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35114 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35132 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35142 impl<'a, K: Debug + Ord, V: Debug> fmt::Display for OccupiedError<'a, K, V> {
35143 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35564 use crate::fmt::Debug;
37825 use core::fmt::{self, Debug};
37859 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
39632 use crate::fmt::Debug;
39946 use core::fmt::Display;
39984 fn fmt(
39986 fmt: &mut core::fmt::Formatter<'_>,
39987 ) -> core::result::Result<(), core::fmt::Error> {
39988 fmt.write_str("memory allocation failed")?;
39995 fmt.write_str(reason)
40005 use core::fmt;
40023 impl<T: fmt::Debug> fmt::Debug for IntoIter<T> {
40024 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40113 use core::{fmt, mem};
40132 impl<T: fmt::Debug> fmt::Debug for Drain<'_, T> {
40133 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40368 use core::fmt;
43193 impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {
43194 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
43281 use core::fmt;
43301 impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
43302 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
44118 use core::fmt;
44147 impl<T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
44148 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
44413 use core::fmt;
44536 impl<T: Ord + fmt::Debug> fmt::Debug for PeekMut<'_, T> {
44537 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
44603 impl<T: fmt::Debug> fmt::Debug for BinaryHeap<T> {
44604 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
45464 impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
45465 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
45529 impl<T: fmt::Debug> fmt::Debug for IntoIter<T> {
45530 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
45849 use core::fmt;
45882 impl<T: fmt::Debug, A: Allocator> fmt::Debug for IntoIter<T, A> {
45883 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
46283 use core::fmt;
46318 impl<T: fmt::Debug, A: Allocator> fmt::Debug for Drain<'_, T, A> {
46319 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
46866 use core::fmt;
49490 impl<T: fmt::Debug, A: Allocator> fmt::Debug for Vec<T, A> {
49491 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
49492 fmt::Debug::fmt(&**self, f)
50309 use core::fmt;
51604 impl<T: fmt::Display + ?Sized, A: Allocator> fmt::Display for Box<T, A> {
51605 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
51606 fmt::Display::fmt(&**self, f)
51611 impl<T: fmt::Debug + ?Sized, A: Allocator> fmt::Debug for Box<T, A> {
51612 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
51613 fmt::Debug::fmt(&**self, f)
51618 impl<T: ?Sized, A: Allocator> fmt::Pointer for Box<T, A> {
51619 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
51623 fmt::Pointer::fmt(&ptr, f)