Trait nom::lib::std::string::ToString 1.0.0[−][src]
A trait for converting a value to a String
.
This trait is automatically implemented for any type which implements the
Display
trait. As such, ToString
shouldn’t be implemented directly:
Display
should be implemented instead, and you get the ToString
implementation for free.
Required methods
pub fn to_string(&self) -> String
[src][−]
Converts the given value to a String
.
Examples
Basic usage:
let i = 5; let five = String::from("5"); assert_eq!(five, i.to_string());
Implementations on Foreign Types
impl ToString for char
[src][−]
impl ToString for str
[src][−]
Implementors
impl ToString for String
1.17.0[src][+]
impl<'_> ToString for Cow<'_, str>
1.17.0[src][+]
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
impl<T> ToString for RaftLog<T> where
T: Storage,
impl<T> ToString for RaftLog<T> where
T: Storage,
impl ToString for BinaryLiteral
impl ToString for BinaryLiteral
impl ToString for Decimal
impl ToString for Decimal
impl<'a> ToString for EnumRef<'a>
impl<'a> ToString for EnumRef<'a>
impl<'a> ToString for JsonRef<'a>
impl<'a> ToString for JsonRef<'a>
impl ToString for Json
impl ToString for Json