Struct EmojiSetData

struct EmojiSetData { ... }

A wrapper around UnicodeSet data (characters and strings)

Implementations

impl EmojiSetData

const fn new<P: EmojiSet>() -> EmojiSetDataBorrowed<'static>

Creates a new EmojiSetDataBorrowed for a EmojiSet.

See the documentation on EmojiSet implementations for details.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

fn try_new_unstable<P: EmojiSet, impl DataProvider<P::DataMarker> + ?Sized: DataProvider<<P as >::DataMarker> + ?Sized>(provider: &impl DataProvider<<P as >::DataMarker> + ?Sized) -> Result<EmojiSetData, DataError>

A version of new() that uses custom data provided by a DataProvider.

Note that this will return an owned version of the data. Functionality is available on the borrowed version, accessible through EmojiSetData::as_borrowed.

fn as_borrowed(self: &Self) -> EmojiSetDataBorrowed<'_>

Construct a borrowed version of this type that can be queried.

This avoids a potential small underlying cost per API call (ex: contains()) by consolidating it up front.

fn from_code_point_inversion_list_string_list(set: CodePointInversionListAndStringList<'static>) -> Self

Construct a new owned CodePointInversionListAndStringList

fn as_code_point_inversion_list_string_list(self: &Self) -> Option<&CodePointInversionListAndStringList<'_>>

Convert this type to a CodePointInversionListAndStringList as a borrowed value.

The data backing this is extensible and supports multiple implementations. Currently it is always CodePointInversionListAndStringList; however in the future more backends may be added, and users may select which at data generation time.

This method returns an Option in order to return None when the backing data provider cannot return a CodePointInversionListAndStringList, or cannot do so within the expected constant time constraint.

fn to_code_point_inversion_list_string_list(self: &Self) -> CodePointInversionListAndStringList<'_>

Convert this type to a CodePointInversionListAndStringList, borrowing if possible, otherwise allocating a new CodePointInversionListAndStringList.

The data backing this is extensible and supports multiple implementations. Currently it is always CodePointInversionListAndStringList; however in the future more backends may be added, and users may select which at data generation time.

The performance of the conversion to this specific return type will vary depending on the data structure that is backing self.

impl Debug for EmojiSetData

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Freeze for EmojiSetData

impl RefUnwindSafe for EmojiSetData

impl Send for EmojiSetData

impl Sync for EmojiSetData

impl Unpin for EmojiSetData

impl UnsafeUnpin for EmojiSetData

impl UnwindSafe for EmojiSetData

impl<T> Any for EmojiSetData

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for EmojiSetData

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for EmojiSetData

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> ErasedDestructor for EmojiSetData

impl<T> From for EmojiSetData

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for EmojiSetData

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for EmojiSetData

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for EmojiSetData

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>