pub struct Emoji { /* private fields */ }Expand description
Widget for rendering emoji with width awareness and fallback.
Implementations§
Source§impl Emoji
impl Emoji
Sourcepub fn with_fallback(self, fallback: impl Into<String>) -> Self
pub fn with_fallback(self, fallback: impl Into<String>) -> Self
Set fallback text shown when emoji can’t be rendered.
Sourcepub fn with_style(self, style: Style) -> Self
pub fn with_style(self, style: Style) -> Self
Set the style for the emoji.
Sourcepub fn with_fallback_style(self, style: Style) -> Self
pub fn with_fallback_style(self, style: Style) -> Self
Set the style for fallback text.
Sourcepub fn effective_width(&self) -> usize
pub fn effective_width(&self) -> usize
Compute the display width of the fallback (or emoji if no fallback).
Sourcepub fn should_use_fallback(&self, use_emoji: bool) -> bool
pub fn should_use_fallback(&self, use_emoji: bool) -> bool
Whether to use fallback based on emoji support.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Emoji
impl RefUnwindSafe for Emoji
impl Send for Emoji
impl Sync for Emoji
impl Unpin for Emoji
impl UnsafeUnpin for Emoji
impl UnwindSafe for Emoji
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more