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 str
1: &'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

impl<'a, 'b> Copy for Emoji<'a, 'b>

Auto Trait Implementations

impl<'a, 'b> Freeze for Emoji<'a, 'b>

impl<'a, 'b> RefUnwindSafe for Emoji<'a, 'b>

impl<'a, 'b> Send for Emoji<'a, 'b>

impl<'a, 'b> Sync for Emoji<'a, 'b>

impl<'a, 'b> Unpin for Emoji<'a, 'b>

impl<'a, 'b> UnsafeUnpin for Emoji<'a, 'b>

impl<'a, 'b> UnwindSafe for Emoji<'a, 'b>

Blanket Implementations

impl<T> Any for Emoji<'a, 'b> where T: 'static + ?Sized,

impl<T> Borrow<T> for Emoji<'a, 'b> where T: ?Sized,

impl<T> BorrowMut<T> for Emoji<'a, 'b> where T: ?Sized,

impl<T> CloneToUninit for Emoji<'a, 'b> where T: Clone,

impl<T> From<T> for Emoji<'a, 'b>

impl<T> ToOwned for Emoji<'a, 'b> where T: Clone,

impl<T> ToString for Emoji<'a, 'b> where T: Display + ?Sized,

impl<T, U> Into<U> for Emoji<'a, 'b> where U: From<T>,

impl<T, U> TryFrom<U> for Emoji<'a, 'b> where U: Into<T>,

impl<T, U> TryInto<U> for Emoji<'a, 'b> where U: TryFrom<T>,