Struct EmojiSetDataBorrowed

struct EmojiSetDataBorrowed<'a> { ... }

A borrowed wrapper around code point set data, returned by [EmojiSetData::as_borrowed()]. More efficient to query.

Implementations

impl EmojiSetDataBorrowed<'_>

fn contains_str(self: Self, s: &str) -> bool

Check if the set contains the string. Strings consisting of one character are treated as a character/code point.

This matches ICU behavior for ICU's UnicodeSet.

fn contains(self: Self, ch: char) -> bool

Check if the set contains the code point.

fn contains32(self: Self, cp: u32) -> bool

See Self::contains.

impl EmojiSetDataBorrowed<'static>

const fn new<P: EmojiSet>() -> Self

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

const fn static_to_owned(self: Self) -> EmojiSetData

Cheaply converts a [EmojiSetDataBorrowed<'static>] into a EmojiSetData.

Note: Due to branching and indirection, using EmojiSetData might inhibit some compile-time optimizations that are possible with EmojiSetDataBorrowed.

impl<'a> Clone for EmojiSetDataBorrowed<'a>

fn clone(self: &Self) -> EmojiSetDataBorrowed<'a>

impl<'a> Copy for EmojiSetDataBorrowed<'a>

impl<'a> Debug for EmojiSetDataBorrowed<'a>

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

impl<'a> Freeze for EmojiSetDataBorrowed<'a>

impl<'a> RefUnwindSafe for EmojiSetDataBorrowed<'a>

impl<'a> Send for EmojiSetDataBorrowed<'a>

impl<'a> Sync for EmojiSetDataBorrowed<'a>

impl<'a> Unpin for EmojiSetDataBorrowed<'a>

impl<'a> UnsafeUnpin for EmojiSetDataBorrowed<'a>

impl<'a> UnwindSafe for EmojiSetDataBorrowed<'a>

impl<T> Any for EmojiSetDataBorrowed<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for EmojiSetDataBorrowed<'a>

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

impl<T> BorrowMut for EmojiSetDataBorrowed<'a>

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

impl<T> CloneToUninit for EmojiSetDataBorrowed<'a>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> ErasedDestructor for EmojiSetDataBorrowed<'a>

impl<T> From for EmojiSetDataBorrowed<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for EmojiSetDataBorrowed<'a>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for EmojiSetDataBorrowed<'a>

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 EmojiSetDataBorrowed<'a>

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

impl<T, U> TryInto for EmojiSetDataBorrowed<'a>

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