jdt_maybe_reference

Crates.iojdt_maybe_reference
lib.rsjdt_maybe_reference
version0.1.12
created_at2025-01-01 06:40:36.335349+00
updated_at2025-07-15 21:42:26.604322+00
descriptionMaybeReference is a utility crate that establishes an enum to use where a value may either be a single JSON string or a JSON object
homepage
repositoryhttps://gitlab.com/justindthomas/maybe_reference
max_upload_size
id1500634
size10,700
Justin Thomas (justindthomas)

documentation

README

MaybeReference

This is a utility crate that establishes an enum to use to match a JSON value that may be a single string (a "reference"), a reference in the form of {"id": "reference"} or an object.

"https://example.com/id/uuid"
{"id": "reference"}
{"id": "reference", "content": "somecontent"}

These would all match to MaybeReference<String> as ::Reference, ::Identifier, ::Actual, respectively.

Commit count: 11

cargo fmt