pub struct ScriptExtensionsSet<'a> { /* private fields */ }
Expand description
A struct that wraps a Script
array, such as in the return value for
get_script_extensions_val()
.
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