refactor for stronger RawPduId type

implement standard traits for PduCount

enable serde for arrayvec

typedef various shortid's

pducount simplifications

split parts of pdu_metadata service to core/pdu and api/relations

remove some yields; improve var names/syntax

tweak types for limit timeline limit arguments

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-02 06:12:54 +00:00
parent 2e4d9cb37c
commit 9da523c004
41 changed files with 796 additions and 573 deletions

19
src/core/pdu/tests.rs Normal file
View file

@ -0,0 +1,19 @@
#![cfg(test)]
use super::PduCount;
#[test]
fn backfilled_parse() {
let count: PduCount = "-987654".parse().expect("parse() failed");
let backfilled = matches!(count, PduCount::Backfilled(_));
assert!(backfilled, "not backfilled variant");
}
#[test]
fn normal_parse() {
let count: PduCount = "987654".parse().expect("parse() failed");
let backfilled = matches!(count, PduCount::Backfilled(_));
assert!(!backfilled, "backfilled variant");
}