pub trait LookaheadMatcher<W: Semiring, F: Fst<W>, B: Borrow<F>>: Matcher<W, F, B> {
    type MatcherData: Clone;

    // Required methods
    fn data(&self) -> Option<&Arc<Self::MatcherData>>;
    fn new_with_data(
        fst: B,
        match_type: MatchType,
        data: Option<Arc<Self::MatcherData>>
    ) -> Result<Self>
       where Self: Sized;
    fn create_data<F2: Fst<W>, BF2: Borrow<F2>>(
        fst: BF2,
        match_type: MatchType
    ) -> Result<Option<Self::MatcherData>>;
    fn init_lookahead_fst<LF: Fst<W>, BLF: Borrow<LF> + Clone>(
        &mut self,
        lfst: &BLF
    ) -> Result<()>;
    fn lookahead_fst<LF: Fst<W>, BLF: Borrow<LF>>(
        &self,
        matcher_state: StateId,
        lfst: &BLF,
        lfst_state: StateId
    ) -> Result<Option<LookAheadMatcherData<W>>>;
    fn lookahead_label(&self, state: StateId, label: Label) -> Result<bool>;
    fn lookahead_prefix(
        &self,
        tr: &mut Tr<W>,
        la_matcher_data: &LookAheadMatcherData<W>
    ) -> bool;
}

Required Associated Types§

Required Methods§

source

fn data(&self) -> Option<&Arc<Self::MatcherData>>

source

fn new_with_data( fst: B, match_type: MatchType, data: Option<Arc<Self::MatcherData>> ) -> Result<Self>
where Self: Sized,

source

fn create_data<F2: Fst<W>, BF2: Borrow<F2>>( fst: BF2, match_type: MatchType ) -> Result<Option<Self::MatcherData>>

source

fn init_lookahead_fst<LF: Fst<W>, BLF: Borrow<LF> + Clone>( &mut self, lfst: &BLF ) -> Result<()>

source

fn lookahead_fst<LF: Fst<W>, BLF: Borrow<LF>>( &self, matcher_state: StateId, lfst: &BLF, lfst_state: StateId ) -> Result<Option<LookAheadMatcherData<W>>>

source

fn lookahead_label(&self, state: StateId, label: Label) -> Result<bool>

source

fn lookahead_prefix( &self, tr: &mut Tr<W>, la_matcher_data: &LookAheadMatcherData<W> ) -> bool

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<W, F, B> LookaheadMatcher<W, F, B> for SortedMatcher<W, F, B>
where W: Semiring, F: Fst<W>, B: Borrow<F> + Debug,

source§

impl<W, F, B, M> LookaheadMatcher<W, F, B> for TrivialLookAheadMatcher<W, M>
where W: Semiring, F: Fst<W>, B: Borrow<F>, M: Matcher<W, F, B>,

source§

impl<W, F, B, M, MFT> LookaheadMatcher<W, F, B> for LabelLookAheadMatcher<W, F, B, M, MFT>
where W: Semiring + 'static, F: Fst<W>, B: Borrow<F> + Debug + Clone, M: Matcher<W, F, B>, MFT: MatcherFlagsTrait,

source§

impl<W, F, B, M, MFT> LookaheadMatcher<W, F, B> for TrLookAheadMatcher<W, F, B, M, MFT>
where W: Semiring, F: Fst<W>, B: Borrow<F> + Debug + Clone, M: Matcher<W, F, B>, MFT: MatcherFlagsTrait,