ActionDB 0.2.0
ihrwein
released this
23 Jul 14:21
·
303 commits
to master
since this release
User visible changes:
- support JSON pattern files
- nicer and more precise error messages
Internal changes:
Matcher
becomes a trait andParserTrie
implements it- the pattern reading and trie building code is extracted into a
Builder
struct Builder
is able to populate anyMatcher
instance from any type which implements thePatternSource
traitBuildResult = Result<Pattern, BuildError>
BuildError
contains all possibleError
types (IO, pattern parse errors, etc.)PatternSource
is automatically implemented for every type which implementsIterator<Item=BuildResult>
- this makes possible to generalize the
Matcher
building logic: BuildResult
s are being read from aPatternSource
and if they areOk()
then they are added to theMatcher
- in case of an
Err()
value the building process stops and the error is returned
Factory
is introduced to createMatcher
instances from files (JSON and plain pattern files)Factory::form_file()
is file extension agnostic and creates aMatcher
instance from the given file
- the big modules are split into smaller submodules
- allow
.
character inParser
names - the
JSON
files can contain test messages. They are tested when their pattern is added to theMatcher
. Coveralls.io
checks every modifications- new unit tests are added