API reference

aster_blueprint::codec

Pre-1.0: signatures are not frozen. Generated from rustdoc JSON of the compiled crate; rustdoc JSON format version 60. Only public items are listed.

Experimental, bounded text interchange for authored blueprint assets.

Only authoring keys are serialized. SourceStamp, PlanId, scene/input receipts and backend state are never serialized or reconstructed by this format.

Structs

structaster_blueprint::codec::DecodeError

pub struct DecodeError { /* see fields */ }

Public fields

fieldtype
lineusize
kindDecodeKind

Trait implementations: Clone, Debug, Display, Eq, Error, PartialEq, StructuralPartialEq

structaster_blueprint::codec::DecodeLimits

pub struct DecodeLimits { /* see fields */ }

Public fields

fieldtype
source_bytesusize
line_bytesusize
linesusize
tokens_per_lineusize
graphmodel::Limits

Trait implementations: Clone, Copy, Debug, Default

Enums

enumaster_blueprint::codec::DecodeKind

pub enum DecodeKind { Capacity, Header, Version, Syntax, Type, DuplicateNode, DuplicateInput, UnknownNode, InvalidEscape, InvalidLiteral, Model }

Variants

  • Capacity
  • Header
  • Version
  • Syntax
  • Type
  • DuplicateNode
  • DuplicateInput
  • UnknownNode
  • InvalidEscape
  • InvalidLiteral
  • Model

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

enumaster_blueprint::codec::EncodeError

pub enum EncodeError { Capacity, Allocation }

Refusal from [encode_bounded]: an admitted limit was exceeded (Capacity) or the bounded output buffer could not reserve memory (Allocation).

Variants

  • Capacity
  • Allocation

Trait implementations: Clone, Copy, Debug, Display, Eq, Error, PartialEq, StructuralPartialEq

Functions

fnaster_blueprint::codec::decode

pub fn decode(text: &str, limits: DecodeLimits) -> Result<model::GraphSource, DecodeError>

Parse a fresh source. An error never mutates an existing source or runtime.

fnaster_blueprint::codec::encode

pub fn encode(graph: &model::GraphSource) -> String

Canonical textual source; deterministic semantic ordering, no local stamps.

fnaster_blueprint::codec::encode_bounded

pub fn encode_bounded(graph: &model::GraphSource, limits: DecodeLimits) -> Result<String, EncodeError>

Bounded canonical encode.

The graph's actual [crate::model::Usage] is checked against the admitted count/byte budget before any output is allocated. The shared canonical emitter then runs through a writer that validates UTF-8 source bytes, line bytes, line count and tokens per line while scanning each chunk, before it reserves or copies. This is logical allocation/byte admission, not an RSS guarantee.