Skip to main content

declared_schema

Function declared_schema 

Source
pub fn declared_schema(root: &Path) -> Result<u32, RkError>
Expand description

The payload_schema the bundle’s own sources declare.

A bundle carries no schema file: the number is the PAYLOAD_SCHEMA constant of the release it is, declared in exactly one source file under src/ with the spelling const PAYLOAD_SCHEMA: u32 = <n>;. This reads it back, so the same rule reaches every release that ever declared the constant, this one included; a test in this crate holds the spelling.

§Errors

Returns RkError::Other when no source declares the constant or when two do.