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.
We need to reverse the iterator for getting the _youngest_ entry here.
Also seems to fix the issue that imag-diary edit -d <date> did not work
properly.
This reverts commit ce0bd9298a.
Pipe magic is removed with this patch.
We remove pipe magic because its implementation in libimagstore is too
complicated and the benefits are too small.
Having this functionality would be really nice, but the cost-benefit
ratio would still be too high.
The implementation in the store would require a rewrite of the internal
caching functionality in the store, plus some functionality to serialize
and deserialize the cache. This is theoretically possible, but as the
store only knows about "StoreEntry" objects, and only the backend knows
of "Entry" (which would be simply de/serializeable), the complexity
increases a _lot_.
Hence, we drop this feature-idea here.
Maybe, at some later point, this functionality will be in imag. The
history of development of this feature is in the history, we just don't
have it merged.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>