Struct icu_properties::script::ScriptExtensionsSet
source · pub struct ScriptExtensionsSet<'a> {
values: &'a ZeroSlice<Script>,
}
Expand description
A struct that wraps a Script
array, such as in the return value for
get_script_extensions_val()
.
Fields§
§values: &'a ZeroSlice<Script>
Implementations§
source§impl<'a> ScriptExtensionsSet<'a>
impl<'a> ScriptExtensionsSet<'a>
sourcepub fn contains(&self, x: &Script) -> bool
pub fn contains(&self, x: &Script) -> bool
Returns whether this set contains the given script.
§Example
use icu::properties::{script, Script};
let swe = script::script_with_extensions();
assert!(swe
.get_script_extensions_val(0x11303) // GRANTHA SIGN VISARGA
.contains(&Script::Grantha));
sourcepub fn iter(&self) -> impl DoubleEndedIterator<Item = Script> + 'a
pub fn iter(&self) -> impl DoubleEndedIterator<Item = Script> + 'a
Gets an iterator over the elements.
§Example
use icu::properties::{script, Script};
let swe = script::script_with_extensions();
assert_eq!(
swe.get_script_extensions_val('௫' as u32) // U+0BEB TAMIL DIGIT FIVE
.iter()
.collect::<Vec<Script>>(),
vec![Script::Tamil, Script::Grantha]
);
Trait Implementations§
source§impl<'a> Clone for ScriptExtensionsSet<'a>
impl<'a> Clone for ScriptExtensionsSet<'a>
source§fn clone(&self) -> ScriptExtensionsSet<'a>
fn clone(&self) -> ScriptExtensionsSet<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for ScriptExtensionsSet<'a>
impl<'a> Debug for ScriptExtensionsSet<'a>
source§impl<'a> PartialEq for ScriptExtensionsSet<'a>
impl<'a> PartialEq for ScriptExtensionsSet<'a>
impl<'a> Copy for ScriptExtensionsSet<'a>
impl<'a> Eq for ScriptExtensionsSet<'a>
impl<'a> StructuralPartialEq for ScriptExtensionsSet<'a>
Auto Trait Implementations§
impl<'a> Freeze for ScriptExtensionsSet<'a>
impl<'a> RefUnwindSafe for ScriptExtensionsSet<'a>
impl<'a> Send for ScriptExtensionsSet<'a>
impl<'a> Sync for ScriptExtensionsSet<'a>
impl<'a> Unpin for ScriptExtensionsSet<'a>
impl<'a> UnwindSafe for ScriptExtensionsSet<'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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)