Trait arithmetic_parser::grammars::MockTypes [−][src]
pub trait MockTypes: 'static { const MOCKED_TYPES: &'static [&'static str]; }
Expand description
Trait allowing to mock out type annotation support together with WithMockedTypes
.
It specifies recognized type annotations; if any other annotation is used, an error
will be raised.
When used as a Parse
r, all Features
are on.
Examples
struct MockedTypesList; impl MockTypes for MockedTypesList { const MOCKED_TYPES: &'static [&'static str] = &["Num"]; } // Grammar that recognizes `Num` type annotation. type Grammar = WithMockedTypes<F64Grammar, MockedTypesList>;
Associated Constants
const MOCKED_TYPES: &'static [&'static str]
[src]
const MOCKED_TYPES: &'static [&'static str]
[src]List of mocked type annotations.