Module semantic_document_read
Expand description
App reader registration and the SDK’s committed-read admission.
An app registers a reader: a closed request decoder, an exact result schema and a projection over its document at given heads. Registration confers no authority. The SDK alone runs a selected reader, and only over a document it can identify as the caller’s canonical record: the record store’s current loan of that exact document for a hosted invocation (whose route the scope verified against the owner), or the app’s mounted primary document on its current primary route. The read binds to the document’s committed heads, never commits a pending edit, and rechecks the original caller immediately before disclosure.
Modules§
- retirement
- Retirement synchronization, never Source, caller or disclosure authority.
Structs§
- NoRead
Params - The parameters of a read that takes none.
- Read
Name - What a registered read’s published action is called: its id, its label and the line that says what it takes.
- Read
Page - One page an app’s projection produced at the heads it was given.
- Registered
Semantic Reader - App-owned code paired with a closed request decoder and exact result schema. Only the actual resolved Widget’s table participates in SDK selection. This public registration cannot create a frame, response stamp, or permission.
Enums§
Constants§
- MAX_
CURSOR_ BYTES - The longest opaque cursor a paged read hands out or accepts.
- MAX_
REQUEST_ BYTES
Traits§
- Semantic
Readers - A widget whose document answers semantic reads through registered
readers. Registration alone supplies no qualified owner frame or
disclosure. Declared with
crate::provides!.
Functions§
- decode_
cursor - The cursor an earlier page handed out, decoded;
Nonereads from the start. - decode_
request - A reader’s closed request, decoded from its payload. The SDK has already
refused a payload over
MAX_REQUEST_BYTES. - encode_
cursor - The opaque cursor for the page after this one, when there is one.
- read_
action - The published action of the registered read whose operation is
operation. Its parameters are the fields ofPasP’s JSON Schema describes them (doc comments,#[schema(range(..))]bounds, choices); a caller’s arguments, bound strictly to them, become aPwith serde, andrequestturns that into the reader’s request. It answersschema, and it is a view of the document: it changes nothing. - registered_
operations - Inert descriptors for reads registered by the actual retained widget tree. This admits no invocation or document: execution still needs the normal bound SDK door and its canonical owner loan. Generic effects are excluded.
- result_
schema - The exact result schema of a read whose projection yields
content: the SDK stampsversion,recordandbasisaround it. Apagedread returns an opaquenextCursoror null; any other read always returns null.
Type Aliases§
- Read
Projection - An app projection over
documentat exactlyheads, for a request the registration’s decoder accepted.