extract api-types crate, adopt thiserror for all errors

api-types: standalone crate with DTOs (widget, data source, layout, preset)
extracted from http-api. Shared between http-api and future SPA.

thiserror: replaced all manual Display impls with derive macros across
8 crates (config-sqlite, config-memory, tcp-server, tcp-client,
http-json, rss, media, application).
This commit is contained in:
2026-06-18 23:01:31 +02:00
parent 6e77236936
commit af47e3939c
30 changed files with 79 additions and 98 deletions

17
Cargo.lock generated
View File

@@ -8,11 +8,20 @@ version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
[[package]]
name = "api-types"
version = "0.1.0"
dependencies = [
"domain",
"serde",
]
[[package]]
name = "application"
version = "0.1.0"
dependencies = [
"domain",
"thiserror",
"tokio",
]
@@ -228,6 +237,7 @@ name = "config-memory"
version = "0.1.0"
dependencies = [
"domain",
"thiserror",
]
[[package]]
@@ -238,6 +248,7 @@ dependencies = [
"serde",
"serde_json",
"sqlx",
"thiserror",
"tokio",
]
@@ -701,6 +712,7 @@ dependencies = [
name = "http-api"
version = "0.1.0"
dependencies = [
"api-types",
"application",
"axum",
"config-memory",
@@ -744,6 +756,7 @@ dependencies = [
"domain",
"reqwest",
"serde_json",
"thiserror",
"tokio",
]
@@ -1068,6 +1081,7 @@ dependencies = [
"domain",
"reqwest",
"serde_json",
"thiserror",
"tokio",
]
@@ -1493,6 +1507,7 @@ dependencies = [
"quick-xml",
"reqwest",
"serde",
"thiserror",
"tokio",
]
@@ -2012,6 +2027,7 @@ version = "0.1.0"
dependencies = [
"client-domain",
"protocol",
"thiserror",
]
[[package]]
@@ -2021,6 +2037,7 @@ dependencies = [
"domain",
"postcard",
"protocol",
"thiserror",
"tokio",
]