soothfast-sdk API reference#
Generated by
cargo soothfast docs referenceMeasurements and verified claims come from the latest baseline; CI gates them.
soothfast_sdk#
SdkFileSet struct#
pub struct SdkFileSet
Rendered SDK files, keyed by path relative to the output directory.
SdkKind enum#
pub enum SdkKind
A language the SDK engine can emit.
SdkOptions struct#
pub struct SdkOptions
Everything an emitter needs that the operations don't carry.
soothfast_sdk::envtemplate#
EnvVar struct#
pub struct EnvVar
One environment variable the embedded server reads.
markdown_table function#
pub fn markdown_table(vars: &[EnvVar]) -> String
Render the knobs as a README table. Same text in both languages: the variables belong to the server, not to whoever is calling it.
parse function#
pub fn parse(text: &str) -> Vec<EnvVar>
Parse a dotenv-style template into the knobs it documents.
Anything unparseable is skipped rather than rejected: the file belongs to the server, and an SDK is not the place a stray line becomes fatal.
Names are unique: a template that shows # KEY=example above the real
KEY= names one knob, and emitting it twice would not compile.
soothfast_sdk::lower#
lower function#
pub fn lower(ops: &[Operation], opts: &SdkOptions, kind: SdkKind) -> Result<Sdk, String>
Lower operations into the SDK model.
Component schemas shared across operations must agree; two operations producing a different schema under one name is the same identity conflict the dialect emitters refuse.
kind decides only how wire names are spelled — every typing question
is answered the same way for every target.
soothfast_sdk::model#
Field struct#
pub struct Field
One field of a [Model].
Method struct#
pub struct Method
One client method, lowered from an operation.
Model struct#
pub struct Model
A named object schema, emitted as a class/interface.
Param struct#
pub struct Param
One parameter of a [Method].
ParamLoc enum#
pub enum ParamLoc
Where a request parameter travels.
Sdk struct#
pub struct Sdk
The whole lowered SDK.
Ty enum#
pub enum Ty
A wire type, lowered from JSON Schema.
soothfast_sdk::target#
Target struct#
pub struct Target
One cross-compilation target and how each ecosystem names it.