pub struct MappingIndex { /* private fields */ }
Expand description
Cacheable indices of selected mapping tables for materializing a character map.
Since Charmap
carries a lifetime, it is difficult to store in a cache.
This type serves as an acceleration structure that allows for construction
of a character map while skipping the search for the most suitable Unicode
mappings.
Implementations§
source§impl MappingIndex
impl MappingIndex
sourcepub fn new<'a>(font: &impl TableProvider<'a>) -> Self
pub fn new<'a>(font: &impl TableProvider<'a>) -> Self
Finds the indices of the most suitable Unicode mapping tables in the given font.
sourcepub fn charmap<'a>(&self, font: &impl TableProvider<'a>) -> Charmap<'a>
pub fn charmap<'a>(&self, font: &impl TableProvider<'a>) -> Charmap<'a>
Creates a new character map for the given font using the tables referenced by the precomputed indices.
The font should be the same as the one used to construct this object.
Trait Implementations§
source§impl Clone for MappingIndex
impl Clone for MappingIndex
source§fn clone(&self) -> MappingIndex
fn clone(&self) -> MappingIndex
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 MappingIndex
impl Debug for MappingIndex
source§impl Default for MappingIndex
impl Default for MappingIndex
source§fn default() -> MappingIndex
fn default() -> MappingIndex
Returns the “default value” for a type. Read more
impl Copy for MappingIndex
Auto Trait Implementations§
impl Freeze for MappingIndex
impl RefUnwindSafe for MappingIndex
impl Send for MappingIndex
impl Sync for MappingIndex
impl Unpin for MappingIndex
impl UnwindSafe for MappingIndex
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
)