struct ParsedRule<'a, const W: usize> {
backtrack: Values<'a, W>,
input: Values<'a, W>,
lookahead: Values<'a, W>,
records: &'a [SequenceLookupRecord],
chained: bool,
}Expand description
A rule’s fields, parsed in one pass. Glyph IDs and classes are both
read as plain values of W bytes; a sequence rule has no backtrack or
lookahead.
Fields§
§backtrack: Values<'a, W>§input: Values<'a, W>§lookahead: Values<'a, W>§records: &'a [SequenceLookupRecord]§chained: boolImplementations§
Source§impl<'a, const W: usize> ParsedRule<'a, W>
impl<'a, const W: usize> ParsedRule<'a, W>
Sourcefn parse(data: FontData<'a>, layout: RuleLayout) -> Self
fn parse(data: FontData<'a>, layout: RuleLayout) -> Self
Parses a rule; an unreadable one is empty.
fn try_parse(data: FontData<'a>, layout: RuleLayout) -> Option<Self>
Sourcefn try_plain(data: FontData<'a>) -> Option<Self>
fn try_plain(data: FontData<'a>) -> Option<Self>
Parses a sequence rule or class sequence rule.
Sourcefn try_chain(data: FontData<'a>) -> Option<Self>
fn try_chain(data: FontData<'a>) -> Option<Self>
Parses a chained sequence rule or chained class sequence rule.
Sourcefn apply(
&self,
ctx: &mut ApplyContext<'_, '_, '_>,
matchers: &ChainMatchers<impl Matcher, impl Matcher, impl Matcher>,
) -> Option<()>
fn apply( &self, ctx: &mut ApplyContext<'_, '_, '_>, matchers: &ChainMatchers<impl Matcher, impl Matcher, impl Matcher>, ) -> Option<()>
Matches the input, lookahead and backtrack sequences in that order and applies the lookup records.
Trait Implementations§
Source§impl<'a, const W: usize> Clone for ParsedRule<'a, W>
impl<'a, const W: usize> Clone for ParsedRule<'a, W>
Source§fn clone(&self) -> ParsedRule<'a, W>
fn clone(&self) -> ParsedRule<'a, W>
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<'a, const W: usize> Copy for ParsedRule<'a, W>
Source§impl<'a, const W: usize> Default for ParsedRule<'a, W>
impl<'a, const W: usize> Default for ParsedRule<'a, W>
Source§fn default() -> ParsedRule<'a, W>
fn default() -> ParsedRule<'a, W>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a, const W: usize> Freeze for ParsedRule<'a, W>
impl<'a, const W: usize> RefUnwindSafe for ParsedRule<'a, W>
impl<'a, const W: usize> Send for ParsedRule<'a, W>
impl<'a, const W: usize> Sync for ParsedRule<'a, W>
impl<'a, const W: usize> Unpin for ParsedRule<'a, W>
impl<'a, const W: usize> UnsafeUnpin for ParsedRule<'a, W>
impl<'a, const W: usize> UnwindSafe for ParsedRule<'a, W>
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