pub struct CodePointSet { /* private fields */ }Expand description
A sorted, mergeable set of codepoints.
The set is the currency of every subsetting operation: it is what
Cmap::codepoints returns and what crate::Font::subset consumes.
Insertion keeps it sorted and duplicate-free.
Implementations§
Source§impl CodePointSet
impl CodePointSet
Sourcepub fn from_iter_raw(iter: impl IntoIterator<Item = u32>) -> Self
pub fn from_iter_raw(iter: impl IntoIterator<Item = u32>) -> Self
A set from any iterator of codepoints: sorted and de-duplicated.
Sourcepub fn union(&self, other: &CodePointSet) -> CodePointSet
pub fn union(&self, other: &CodePointSet) -> CodePointSet
The union of two sets.
Sourcepub fn intersection(&self, other: &CodePointSet) -> CodePointSet
pub fn intersection(&self, other: &CodePointSet) -> CodePointSet
The intersection of two sets.
Sourcepub fn difference(&self, other: &CodePointSet) -> CodePointSet
pub fn difference(&self, other: &CodePointSet) -> CodePointSet
self minus other.
Sourcepub fn is_subset_of(&self, other: &CodePointSet) -> bool
pub fn is_subset_of(&self, other: &CodePointSet) -> bool
True when every codepoint of self is also in other.
Trait Implementations§
Source§impl Clone for CodePointSet
impl Clone for CodePointSet
Source§impl Debug for CodePointSet
impl Debug for CodePointSet
Source§impl Default for CodePointSet
impl Default for CodePointSet
impl Eq for CodePointSet
Source§impl PartialEq for CodePointSet
impl PartialEq for CodePointSet
impl StructuralPartialEq for CodePointSet
Auto Trait Implementations§
impl Freeze for CodePointSet
impl RefUnwindSafe for CodePointSet
impl Send for CodePointSet
impl Sync for CodePointSet
impl Unpin for CodePointSet
impl UnsafeUnpin for CodePointSet
impl UnwindSafe for CodePointSet
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