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 duplicate 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§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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.