Function cmp_str
fn cmp_str<impl Writeable: Writeable>(writeable: &impl Writeable, other: &str) -> Ordering
Compares the contents of a Writeable to the given bytes
without allocating a String to hold the Writeable contents.
This returns a lexicographical comparison, the same as if the Writeable
were first converted to a String and then compared with Ord. For a
string ordering suitable for display to end users, use a localized
collation crate, such as icu_collator.
Examples
use Ordering;
use fmt;
use Writeable;
let message = WelcomeMessage ;
let message_str = message.write_to_string;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;