pub(crate) enum SecondGlyph {
Unknown,
Missing {
unsafe_to: usize,
},
Found {
index: usize,
buf_idx: usize,
glyph: GlyphId,
},
Failed,
}Expand description
The glyph that a pair starting at the current glyph would pair with.
It depends only on the buffer and the lookup, so the subtables of a pair lookup share one search per position.
Variants§
Implementations§
Source§impl SecondGlyph
impl SecondGlyph
Sourcefn get(
&mut self,
ctx: &mut ApplyContext<'_, '_, '_>,
) -> Option<(usize, usize, GlyphId)>
fn get( &mut self, ctx: &mut ApplyContext<'_, '_, '_>, ) -> Option<(usize, usize, GlyphId)>
Returns the second glyph’s index in the buffer, the index to resume from after the pair, and the glyph, searching the first time. Without one, marks the buffer unsafe to concatenate as far as the search went.
Sourcefn resolve(
self,
ctx: &mut ApplyContext<'_, '_, '_>,
) -> Option<(usize, usize, GlyphId)>
fn resolve( self, ctx: &mut ApplyContext<'_, '_, '_>, ) -> Option<(usize, usize, GlyphId)>
The second glyph, if the search found one.
fn search(ctx: &mut ApplyContext<'_, '_, '_>) -> Self
Trait Implementations§
Source§impl Clone for SecondGlyph
impl Clone for SecondGlyph
Source§fn clone(&self) -> SecondGlyph
fn clone(&self) -> SecondGlyph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SecondGlyph
Auto Trait Implementations§
impl Freeze for SecondGlyph
impl RefUnwindSafe for SecondGlyph
impl Send for SecondGlyph
impl Sync for SecondGlyph
impl Unpin for SecondGlyph
impl UnsafeUnpin for SecondGlyph
impl UnwindSafe for SecondGlyph
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