pub struct UnicodeSetDataBorrowed<'a> { /* private fields */ }Expand description
A borrowed wrapper around code point set data, returned by
UnicodeSetData::as_borrowed(). More efficient to query.
Implementations§
Source§impl<'a> UnicodeSetDataBorrowed<'a>
impl<'a> UnicodeSetDataBorrowed<'a>
Sourcepub fn contains(self, s: &str) -> bool
pub fn contains(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.
Sourcepub fn contains32(&self, cp: u32) -> bool
pub fn contains32(&self, cp: u32) -> bool
Check if the set contains a character as a UTF32 code unit
Sourcepub fn contains_char(&self, ch: char) -> bool
pub fn contains_char(&self, ch: char) -> bool
Check if the set contains the code point corresponding to the Rust character.
Source§impl UnicodeSetDataBorrowed<'static>
impl UnicodeSetDataBorrowed<'static>
Sourcepub const fn static_to_owned(self) -> UnicodeSetData
pub const fn static_to_owned(self) -> UnicodeSetData
Cheaply converts a UnicodeSetDataBorrowed<'static> into a UnicodeSetData.
Note: Due to branching and indirection, using UnicodeSetData might inhibit some
compile-time optimizations that are possible with UnicodeSetDataBorrowed.
Trait Implementations§
Source§impl<'a> Clone for UnicodeSetDataBorrowed<'a>
impl<'a> Clone for UnicodeSetDataBorrowed<'a>
Source§fn clone(&self) -> UnicodeSetDataBorrowed<'a>
fn clone(&self) -> UnicodeSetDataBorrowed<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for UnicodeSetDataBorrowed<'a>
impl<'a> Debug for UnicodeSetDataBorrowed<'a>
impl<'a> Copy for UnicodeSetDataBorrowed<'a>
Auto Trait Implementations§
impl<'a> Freeze for UnicodeSetDataBorrowed<'a>
impl<'a> RefUnwindSafe for UnicodeSetDataBorrowed<'a>
impl<'a> Send for UnicodeSetDataBorrowed<'a>
impl<'a> Sync for UnicodeSetDataBorrowed<'a>
impl<'a> Unpin for UnicodeSetDataBorrowed<'a>
impl<'a> UnwindSafe for UnicodeSetDataBorrowed<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes