Struct Emoji
pub struct Emoji<'a, 'b>(pub &'a str, pub &'b str);
"Intelligent" emoji formatter.
This struct intelligently wraps an emoji so that it is rendered only on systems that want emojis and renders a fallback on others.
Example:
use console::Emoji;
println!("[3/4] {}Downloading ...", Emoji("🚚 ", ""));
println!("[4/4] {} Done!", Emoji("✨", ":-)"));
Fields
0: &'a str1: &'b str
Implementations
impl<'a, 'b> Emoji<'a, 'b>
fn new(emoji: &'a str, fallback: &'b str) -> Emoji<'a, 'b>
Trait Implementations
impl Display for Emoji<'_, '_>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a, 'b> Clone for Emoji<'a, 'b>
fn clone(&self) -> Self