Struct icu_properties::script::ScriptExtensionsSet
source · 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::ScriptWithExtensions;
use icu::properties::props::Script;
let swe = ScriptWithExtensions::new();
assert!(swe
.get_script_extensions_val('\u{11303}') // 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::ScriptWithExtensions;
use icu::properties::props::Script;
let swe = ScriptWithExtensions::new();
assert_eq!(
swe.get_script_extensions_val('௫') // U+0BEB TAMIL DIGIT FIVE
.iter()
.collect::<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
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more