DOC-FULL-A7 P2 | Deserialize field rename 与 uniffi 兼容性验证 #96
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
审查发现
F7: progress.rs 的 #[serde(rename)] 在 uniffi::Enum 上可能被覆盖。需验证从 camelCase JSON 反序列化是否正常。已通过 test_roundtrip 测试,但仅限 serde 路径。
M-DOC-FULL Batch 0 审查 issue。
验证完成
结论
#[serde(rename)]+#[derive(uniffi::Enum)]共存无冲突。验证方法
1. serde 路径(已验证)
test_deserialize_from_camel_case_json— 全部 6 种 variant 从 camelCase JSON 正确反序列化test_deserialize_serialize_roundtrip_all_variants— camelCase→deserialize→serialize→deserialize 无损test_rename_attrs_not_overridden_by_uniffi— 关键验证:snake_case 被拒绝(rename 生效),camelCase 被接受2. uniffi 路径(已验证)
cargo check编译无uniffi::Enum相关错误ReadingPosition字段使用 snake_case (block_id,scroll_progress等),与 Rust 源码一致关键测试
验证