Struct norad::Codepoints
source · pub struct Codepoints(/* private fields */);
Expand description
A set of Unicode codepoints
Implementations§
source§impl Codepoints
impl Codepoints
sourcepub fn new(src: impl IntoIterator<Item = char>) -> Self
pub fn new(src: impl IntoIterator<Item = char>) -> Self
Construct a new set of codepoints.
The input can be anything that impls IntoIterator<Item=char>
,
and the simplest use would be to pass an array:
let mut codepoints = Codepoints::new(['A', 'B']);
sourcepub fn set(&mut self, codepoints: impl IntoIterator<Item = char>)
pub fn set(&mut self, codepoints: impl IntoIterator<Item = char>)
Set the codepoints. See Codepoints::new for usage.
sourcepub fn contains(&self, codepoint: char) -> bool
pub fn contains(&self, codepoint: char) -> bool
Returns true if the provided codepoint is in this set.
Trait Implementations§
source§impl Clone for Codepoints
impl Clone for Codepoints
source§fn clone(&self) -> Codepoints
fn clone(&self) -> Codepoints
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 Debug for Codepoints
impl Debug for Codepoints
source§impl Default for Codepoints
impl Default for Codepoints
source§fn default() -> Codepoints
fn default() -> Codepoints
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for Codepoints
impl<'de> Deserialize<'de> for Codepoints
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromIterator<char> for Codepoints
impl FromIterator<char> for Codepoints
source§impl<'a> IntoIterator for &'a Codepoints
impl<'a> IntoIterator for &'a Codepoints
source§impl IntoIterator for Codepoints
impl IntoIterator for Codepoints
source§impl PartialEq for Codepoints
impl PartialEq for Codepoints
source§fn eq(&self, other: &Codepoints) -> bool
fn eq(&self, other: &Codepoints) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Codepoints
impl Serialize for Codepoints
impl Eq for Codepoints
impl StructuralPartialEq for Codepoints
Auto Trait Implementations§
impl Freeze for Codepoints
impl RefUnwindSafe for Codepoints
impl Send for Codepoints
impl Sync for Codepoints
impl Unpin for Codepoints
impl UnwindSafe for Codepoints
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.