Context
Issue #47 requires "also Rust traits/types representation" as a storage form.
LinkType::Object and LinkNetwork::insert_object cover identity and
circular references, and lino-objects-codec fixtures are gated, but arbitrary
user structs/enums cannot be encoded to links and decoded back, and Rust type
shapes are not represented. See requirements.md
R-9 and solution-plans.md S-7.
Ecosystem parity target: lino-objects-codec 0.2.1 (Rust) / 0.4.0 (npm) -
object encode/decode with identity and circular-reference preservation
(formats-storage-apis.md Part B).
Blocked by: #05 (the LiNo serializer makes encodings inspectable and
provides the codec's text form).
Scope
ToLinks / FromLinks traits with implementations for primitives, Vec,
Option, maps; decide between a #[derive(Links)] proc-macro and a serde
Serializer/Deserializer adapter (serde reuses the whole ecosystem at zero
macro cost) - record the decision and rationale.
- Preserve shared references and cycles via object-identity links, porting
lino-objects-codec's shared-reference and circular-reference cases as
fixtures.
- Represent Rust type declarations (struct/enum/trait shape) as links using
the existing self-description roots (type, Type, field) so type shape
is queryable data.
Acceptance criteria
References
Filed from docs/case-studies/issue-47/proposed-issues/07-rust-types-links-codec.md. Part of the implementation plan for #47.
Context
Issue #47 requires "also Rust traits/types representation" as a storage form.
LinkType::ObjectandLinkNetwork::insert_objectcover identity andcircular references, and lino-objects-codec fixtures are gated, but arbitrary
user structs/enums cannot be encoded to links and decoded back, and Rust type
shapes are not represented. See
requirements.mdR-9 and
solution-plans.mdS-7.Ecosystem parity target:
lino-objects-codec0.2.1 (Rust) / 0.4.0 (npm) -object encode/decode with identity and circular-reference preservation
(
formats-storage-apis.mdPart B).Blocked by:
#05(the LiNo serializer makes encodings inspectable andprovides the codec's text form).
Scope
ToLinks/FromLinkstraits with implementations for primitives,Vec,Option, maps; decide between a#[derive(Links)]proc-macro and a serdeSerializer/Deserializer adapter (serde reuses the whole ecosystem at zero
macro cost) - record the decision and rationale.
lino-objects-codec's shared-reference and circular-reference cases as
fixtures.
the existing self-description roots (
type,Type,field) so type shapeis queryable data.
Acceptance criteria
links and through LiNo text.
LinkQuery.bump: minor).References
requirements.mdR-9solution-plans.mdS-7issue-47-76af108c0f24(PR Finish issue #47 parity feature set #48).Filed from
docs/case-studies/issue-47/proposed-issues/07-rust-types-links-codec.md. Part of the implementation plan for #47.