Trait enso_prelude::fmt::Display 1.0.0[−][src]
Expand description
Format trait for an empty format, {}
.
Display
is similar to Debug
, but Display
is for user-facing
output, and so cannot be derived.
For more information on formatters, see the module-level documentation.
Examples
Implementing Display
on a type:
use std::fmt; struct Point { x: i32, y: i32, } impl fmt::Display for Point { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "({}, {})", self.x, self.y) } } let origin = Point { x: 0, y: 0 }; assert_eq!(format!("The origin is: {}", origin), "The origin is: (0, 0)");
Required methods
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
[src]
Expand description
Formats the value using the given formatter.
Examples
use std::fmt; struct Position { longitude: f32, latitude: f32, } impl fmt::Display for Position { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "({}, {})", self.longitude, self.latitude) } } assert_eq!("(1.987, 2.983)", format!("{}", Position { longitude: 1.987, latitude: 2.983, }));
Implementations on Foreign Types
impl<T> Display for TrySendError<T>
[src]
impl<T> Display for TrySendError<T>
[src]impl<T> Display for PoisonError<T>
[src]
impl<T> Display for PoisonError<T>
[src]impl<'_, T> Display for MutexGuard<'_, T> where
T: Display + ?Sized,
[src]
impl<'_, T> Display for MutexGuard<'_, T> where
T: Display + ?Sized,
[src]impl<W> Display for IntoInnerError<W>
[src]
impl<W> Display for IntoInnerError<W>
[src]impl<'a, K, V> Display for OccupiedError<'a, K, V> where
K: Debug,
V: Debug,
[src]
impl<'a, K, V> Display for OccupiedError<'a, K, V> where
K: Debug,
V: Debug,
[src]impl Display for FromBytesWithNulError
[src]
impl Display for FromBytesWithNulError
[src]impl Display for RecvTimeoutError
[src]
impl Display for RecvTimeoutError
[src]impl Display for SystemTimeError
[src]
impl Display for SystemTimeError
[src]impl Display for TryRecvError
[src]
impl Display for TryRecvError
[src]impl Display for FromVecWithNulError
[src]
impl Display for FromVecWithNulError
[src]impl Display for StripPrefixError
[src]
impl Display for StripPrefixError
[src]impl Display for Ipv6Addr
[src]
impl Display for Ipv6Addr
[src]Write an Ipv6Addr, conforming to the canonical style described by RFC 5952.
impl Display for SocketAddrV6
[src]
impl Display for SocketAddrV6
[src]impl<'_, T> Display for RwLockReadGuard<'_, T> where
T: Display + ?Sized,
[src]
impl<'_, T> Display for RwLockReadGuard<'_, T> where
T: Display + ?Sized,
[src]impl Display for SocketAddrV4
[src]
impl Display for SocketAddrV4
[src]impl Display for IntoStringError
[src]
impl Display for IntoStringError
[src]impl<T> Display for TryLockError<T>
[src]
impl<T> Display for TryLockError<T>
[src]impl<'_, T> Display for RwLockWriteGuard<'_, T> where
T: Display + ?Sized,
[src]
impl<'_, T> Display for RwLockWriteGuard<'_, T> where
T: Display + ?Sized,
[src]impl Display for JoinPathsError
[src]
impl Display for JoinPathsError
[src]impl Display for AddrParseError
[src]
impl Display for AddrParseError
[src]impl Display for EscapeUnicode
[src]
impl Display for EscapeUnicode
[src]impl Display for NonZeroIsize
[src]
impl Display for NonZeroIsize
[src]impl Display for EscapeDefault
[src]
impl Display for EscapeDefault
[src]impl Display for ParseIntError
[src]
impl Display for ParseIntError
[src]impl<'a> Display for EscapeAscii<'a>
[src]
impl<'a> Display for EscapeAscii<'a>
[src]impl Display for ParseCharError
[src]
impl Display for ParseCharError
[src]impl Display for ParseFloatError
[src]
impl Display for ParseFloatError
[src]impl Display for CharTryFromError
[src]
impl Display for CharTryFromError
[src]impl Display for TryFromIntError
[src]
impl Display for TryFromIntError
[src]impl Display for BorrowMutError
[src]
impl Display for BorrowMutError
[src]impl Display for NonZeroUsize
[src]
impl Display for NonZeroUsize
[src]impl Display for EscapeDefault
[src]
impl Display for EscapeDefault
[src]impl Display for DecodeUtf16Error
[src]
impl Display for DecodeUtf16Error
[src]impl<'a> Display for EscapeDebug<'a>
[src]
impl<'a> Display for EscapeDebug<'a>
[src]impl Display for TryFromSliceError
[src]
impl Display for TryFromSliceError
[src]impl<'a> Display for EscapeUnicode<'a>
[src]
impl<'a> Display for EscapeUnicode<'a>
[src]impl<'a> Display for EscapeDefault<'a>
[src]
impl<'a> Display for EscapeDefault<'a>
[src]impl Display for ParseBoolError
[src]
impl Display for ParseBoolError
[src]impl Display for FromUtf16Error
[src]
impl Display for FromUtf16Error
[src]impl Display for FromUtf8Error
[src]
impl Display for FromUtf8Error
[src]impl Display for TryReserveError
[src]
impl Display for TryReserveError
[src]impl<'a> Display for SymbolName<'a>
[src]
impl<'a> Display for SymbolName<'a>
[src]impl<'a> Display for BytesOrWideString<'a>
[src]
impl<'a> Display for BytesOrWideString<'a>
[src]impl Display for CollectionAllocErr
[src]
impl Display for CollectionAllocErr
[src]impl<T> Display for SyncFailure<T> where
T: Display,
[src]
impl<T> Display for SyncFailure<T> where
T: Display,
[src]impl<'a, I, F> Display for FormatWith<'a, I, F> where
F: FnMut(<I as Iterator>::Item, &mut dyn FnMut(&dyn Display)) -> Result<(), Error>,
I: Iterator,
[src]
impl<'a, I, F> Display for FormatWith<'a, I, F> where
F: FnMut(<I as Iterator>::Item, &mut dyn FnMut(&dyn Display)) -> Result<(), Error>,
I: Iterator,
[src]impl Display for ParseBigIntError
[src]
impl Display for ParseBigIntError
[src]impl Display for ParseFloatError
[src]
impl Display for ParseFloatError
[src]impl<E> Display for ParseComplexError<E> where
E: Display,
[src]
impl<E> Display for ParseComplexError<E> where
E: Display,
[src]impl Display for ParseRatioError
[src]
impl Display for ParseRatioError
[src]impl<N, R, C, S> Display for Matrix<N, R, C, S> where
C: Dim,
R: Dim,
S: Storage<N, R, C>,
N: Scalar + Display,
DefaultAllocator: Allocator<usize, R, C>,
[src]
impl<N, R, C, S> Display for Matrix<N, R, C, S> where
C: Dim,
R: Dim,
S: Storage<N, R, C>,
N: Scalar + Display,
DefaultAllocator: Allocator<usize, R, C>,
[src]impl<N> Display for Unit<Quaternion<N>> where
N: RealField + Display,
[src]
impl<N> Display for Unit<Quaternion<N>> where
N: RealField + Display,
[src]impl<N, D> Display for Translation<N, D> where
N: Scalar + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
DefaultAllocator: Allocator<usize, D, U1>,
[src]
impl<N, D> Display for Translation<N, D> where
N: Scalar + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
DefaultAllocator: Allocator<usize, D, U1>,
[src]impl<N, D, R> Display for Isometry<N, D, R> where
R: Display,
N: RealField + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
DefaultAllocator: Allocator<usize, D, U1>,
[src]
impl<N, D, R> Display for Isometry<N, D, R> where
R: Display,
N: RealField + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
DefaultAllocator: Allocator<usize, D, U1>,
[src]impl<N, D> Display for Rotation<N, D> where
N: RealField + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, D>,
DefaultAllocator: Allocator<usize, D, D>,
[src]
impl<N, D> Display for Rotation<N, D> where
N: RealField + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, D>,
DefaultAllocator: Allocator<usize, D, D>,
[src]impl<N> Display for Quaternion<N> where
N: RealField + Display,
[src]
impl<N> Display for Quaternion<N> where
N: RealField + Display,
[src]impl<N, D, R> Display for Similarity<N, D, R> where
R: AbstractRotation<N, D> + Display,
N: RealField + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
DefaultAllocator: Allocator<usize, D, U1>,
[src]
impl<N, D, R> Display for Similarity<N, D, R> where
R: AbstractRotation<N, D> + Display,
N: RealField + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
DefaultAllocator: Allocator<usize, D, U1>,
[src]impl<N, D> Display for Point<N, D> where
N: Scalar + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
[src]
impl<N, D> Display for Point<N, D> where
N: Scalar + Display,
D: DimName,
DefaultAllocator: Allocator<N, D, U1>,
[src]impl Display for BernoulliError
[src]
impl Display for BernoulliError
[src]impl Display for WeightedError
[src]
impl Display for WeightedError
[src]Implementors
impl<'_, B> Display for Cow<'_, B> where
B: Display + ToOwned + ?Sized,
<B as ToOwned>::Owned: Display,
[src]
impl<'_, B> Display for Cow<'_, B> where
B: Display + ToOwned + ?Sized,
<B as ToOwned>::Owned: Display,
[src]