mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 14:02:55 +00:00
Improve the serde impl for several types (`Lsn`, `TenantId`, `TimelineId`) by making them sensitive to `Serializer::is_human_readadable` (true for json, false for bincode). Fixes #3511 by: - Implement the custom serde for `Lsn` - Implement the custom serde for `Id` - Add the helper module `serde_as_u64` in `libs/utils/src/lsn.rs` - Remove the unnecessary attr `#[serde_as(as = "DisplayFromStr")]` in all possible structs Additionally some safekeeper types gained serde tests. --------- Co-authored-by: Joonas Koivunen <joonas@neon.tech>
63 lines
1.6 KiB
TOML
63 lines
1.6 KiB
TOML
[package]
|
|
name = "utils"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
sentry.workspace = true
|
|
async-trait.workspace = true
|
|
anyhow.workspace = true
|
|
bincode.workspace = true
|
|
bytes.workspace = true
|
|
camino.workspace = true
|
|
chrono.workspace = true
|
|
heapless.workspace = true
|
|
hex = { workspace = true, features = ["serde"] }
|
|
hyper = { workspace = true, features = ["full"] }
|
|
futures = { workspace = true}
|
|
jsonwebtoken.workspace = true
|
|
nix.workspace = true
|
|
once_cell.workspace = true
|
|
pin-project-lite.workspace = true
|
|
regex.workspace = true
|
|
routerify.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
signal-hook.workspace = true
|
|
thiserror.workspace = true
|
|
tokio.workspace = true
|
|
tokio-util.workspace = true
|
|
tracing.workspace = true
|
|
tracing-error.workspace = true
|
|
tracing-subscriber = { workspace = true, features = ["json", "registry"] }
|
|
rand.workspace = true
|
|
serde_with.workspace = true
|
|
strum.workspace = true
|
|
strum_macros.workspace = true
|
|
url.workspace = true
|
|
uuid.workspace = true
|
|
|
|
pq_proto.workspace = true
|
|
postgres_connection.workspace = true
|
|
metrics.workspace = true
|
|
workspace_hack.workspace = true
|
|
|
|
const_format.workspace = true
|
|
|
|
# to use tokio channels as streams, this is faster to compile than async_stream
|
|
# why is it only here? no other crate should use it, streams are rarely needed.
|
|
tokio-stream = { version = "0.1.14" }
|
|
|
|
[dev-dependencies]
|
|
byteorder.workspace = true
|
|
bytes.workspace = true
|
|
criterion.workspace = true
|
|
hex-literal.workspace = true
|
|
camino-tempfile.workspace = true
|
|
serde_assert.workspace = true
|
|
|
|
[[bench]]
|
|
name = "benchmarks"
|
|
harness = false
|