pub struct WithNoDef<M, T: 'static> { /* private fields */ }
Expand description
Customizable emoji composer without default.
This struct contains a set of Emoji
which can be differentiated by an attribute M
such as
Tone
, Gender
, and Hair
. Depending on the attribute type this struct provides
customization functions such as WithNoDef::tone
, WithNoDef::gender
,
and WithNoDef::hair
, respectively.
Notice unlike the With
, this struct has no default variant and thus can not directly be
used, instead customization is mandatory.
Implementations
sourceimpl<T> WithNoDef<Tone, T>
impl<T> WithNoDef<Tone, T>
Customizing by Tone
without defaults.
There is currently no such emoji
sourceimpl<T> WithNoDef<TonePair, T>
impl<T> WithNoDef<TonePair, T>
Customizing by TonePair
without defaults.
There is currently no such emoji
sourceimpl<T> WithNoDef<Gender, T>
impl<T> WithNoDef<Gender, T>
Customizing by Gender
without defaults.
Examples
//assert_eq!(PERSON_DANCING.to_string(), "?"); // no default, would not compile
assert_eq!(PERSON_DANCING.gender(Gender::Male).to_string(), "🕺"); // Variant with male gender
assert_eq!(PERSON_DANCING.gender(Gender::Female).to_string(), "💃"); // Variant with female gender
sourceimpl<T> WithNoDef<Hair, T>
impl<T> WithNoDef<Hair, T>
Customizing by Hair
without defaults.
There is currently no such emoji
sourceimpl<T> WithNoDef<Pair, T>
impl<T> WithNoDef<Pair, T>
Customizing by Pair
without defaults.
There is currently no such emoji