Before we had the problem that when iterating over _a lot_ (like 5k)
entries and also fetching them, at some point the OS would return with
"Too many files open".
That is because the store internally caches a lot.
With this change, the Store gets an API to query how big the cache is,
how much the cache can currently hold and (and that's the main thing in
this patch) to flush the cache to disk.
A function to simply ask the store whether its cache should be flushed
(which would us require to ask the OS how many files we can open...
which would be possible with `libc::getrlimit`) does not yet exist,
though, but could be added easily if desired.
We have to move the `Email` type at the bottom of the DeserVcard type
because it contains a table and we must emit tables as last values when
de/serializing.
Maybe this will shoot us in the foot later, but only with TOML I guess.
We'll see. For now, this is good.
For that we need to update a dependency: vobject -> 0.5
This patch rewrites the whole libimagcategory and brings it to a nice
standard (the code before was rather messy).
Now, categories are represented by an entry in the store and all entries
which have this category are linked to that entry.
The rust compiler does some fancy things for us: It automatically finds
the right fields if the name of the variable and the file is the same.
Lets use that to reduce boilerplate with this patch.
In the previous versions, the sink (where the entries should be written
to) was not passed.
This did conflict with the libimagrt holding the stdout/stderr handles,
because it automatically writes to stdout (which we don't want to do in
some cases).
Passing the sink is way nicer. This patch changes libimagentryview so
that the sink is passed to the viewer.