Struct CodePointSetDataBorrowed
struct CodePointSetDataBorrowed<'a> { ... }
A borrowed wrapper around code point set data, returned by
[CodePointSetData::as_borrowed()]. More efficient to query.
Implementations
impl CodePointSetDataBorrowed<'static>
const fn new<P: BinaryProperty>() -> SelfCreates a new
CodePointSetDatafor aBinaryProperty.✨ Enabled with the
compiled_dataCargo feature.const fn static_to_owned(self: Self) -> CodePointSetDataCheaply converts a [
CodePointSetDataBorrowed<'static>] into aCodePointSetData.Note: Due to branching and indirection, using
CodePointSetDatamight inhibit some compile-time optimizations that are possible withCodePointSetDataBorrowed.
impl<'a> CodePointSetDataBorrowed<'a>
fn contains(self: Self, ch: char) -> boolCheck if the set contains a character
use CodePointSetData; use Alphabetic; let alphabetic = ; assert!; assert!; // U+0A69 GURMUKHI DIGIT THREE assert!; assert!; // U+00C4 LATIN CAPITAL LETTER A WITH DIAERESISfn contains32(self: Self, ch: u32) -> boolSee
Self::contains.fn iter_ranges(self: Self) -> impl Iterator<Item = RangeInclusive<u32>> + 'aincluded in the
CodePointSetDataRanges are returned as
RangeInclusive, which is inclusive of itsendbound value. An end-inclusive behavior matches the ICU4C/J behavior of ranges, ex:UnicodeSet::contains(UChar32 start, UChar32 end).Example
use Alphabetic; use CodePointSetData; let alphabetic = ; let mut ranges = alphabetic.iter_ranges; assert_eq!; // 'A'..'Z' assert_eq!; // 'a'..'z'fn iter_ranges_complemented(self: Self) -> impl Iterator<Item = RangeInclusive<u32>> + 'anot included in the
CodePointSetDataRanges are returned as
RangeInclusive, which is inclusive of itsendbound value. An end-inclusive behavior matches the ICU4C/J behavior of ranges, ex:UnicodeSet::contains(UChar32 start, UChar32 end).Example
use Alphabetic; use CodePointSetData; let alphabetic = ; let mut ranges = alphabetic.iter_ranges; assert_eq!; // 'A'..'Z' assert_eq!; // 'a'..'z'
impl<'a> Clone for CodePointSetDataBorrowed<'a>
fn clone(self: &Self) -> CodePointSetDataBorrowed<'a>
impl<'a> Copy for CodePointSetDataBorrowed<'a>
impl<'a> Debug for CodePointSetDataBorrowed<'a>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'a> Freeze for CodePointSetDataBorrowed<'a>
impl<'a> RefUnwindSafe for CodePointSetDataBorrowed<'a>
impl<'a> Send for CodePointSetDataBorrowed<'a>
impl<'a> Sync for CodePointSetDataBorrowed<'a>
impl<'a> Unpin for CodePointSetDataBorrowed<'a>
impl<'a> UnsafeUnpin for CodePointSetDataBorrowed<'a>
impl<'a> UnwindSafe for CodePointSetDataBorrowed<'a>
impl<T> Any for CodePointSetDataBorrowed<'a>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for CodePointSetDataBorrowed<'a>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for CodePointSetDataBorrowed<'a>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for CodePointSetDataBorrowed<'a>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for CodePointSetDataBorrowed<'a>
impl<T> From for CodePointSetDataBorrowed<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for CodePointSetDataBorrowed<'a>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for CodePointSetDataBorrowed<'a>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for CodePointSetDataBorrowed<'a>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for CodePointSetDataBorrowed<'a>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>