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>
This patch adds the "serde" feature to the "log" dependency, so we can
deserialize logging levels directly into "log" types.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This patch rewrites the logging config deserialization. It removes the
manual traversing of the config toml structure and replaces it with
types which implement `Deserialize`, which is way more convenient and
easy to read (and extend).
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Prior to this change, the IdPathProvider implementation would be
responsible for exiting the process on insufficient / wrong arguments.
However, such error handling should be performed together with the
business logic and not in CLI-parsing related code.
This change introduces a clear separation: both parsing errors and
insufficient id path arguments can now be return from inside the
`get_ids`-method, and get passed up to the application logic to be
handled.
This change is reflected in all instances of IdPathProvider and their
surrounding code.
Signed-off-by: Leon Schuermann <leon.git@is.currently.online>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
When installing (a subcrate) from crates.io, it fails because it cannot
find the buildscript. This is the quickfix, simply remove the
buildscript itself and the setup of the buildscript in all Cargo.toml
files.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>