This patch rewrites the get_tags() function to use toml_query::read::Partial.
The helper functions is_tag_str and is_tag are rewritten for
compatiblity.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This patch adds support for directional links in libimagentrylink.
A directional link is added to the same header as the "internal" links,
which are unidirectional.
The "outgoing" link is added in "links.to", the "incoming" links are
added to "links.from".
This way we can always traverse all linkage. The `Linkable::links()`
method is changed to always return _all_ link.
The `Link` type was extended for notions of "to" and "from" links.
Also adds testing.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This patch removes the annotateable linking feature from libimagentrylink.
It was not used anyways.
Also, this patch rewrites the complete linking code to use the
toml-query "typed" feature rather than constructing everything by
itself.
This removes a lot of unmaintainable boilerplate code.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
With this patch, the libimagentrylink library interface gets renamed.
The trait gets renamed to the more descriptive name "Linkable", the
functions get renamed to not contain any notion of "internal" anymore.
This patch also adapts the whole source tree for the new libimagentrylink
interface, also renaming variables to not contain "_internal_" anymore.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Because we need to catch errors that are caused by a borken pipe when
writing to stdout (for example), this patch changes the interface of the
Viewer trait to return an error enum that can be used to check whether
an IO error happened.
The calling code can then decide whether to ignore a broken pipe error
or whether to handle it properly.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Because we depend on try_into in these patches, we have to bump the
rustc version to 1.34.0 minimum here.
And because we do support the last three rust stable compilers, this has
to wait.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>