soothfast v0.1.0

soothfast-sdk API reference#

Generated by cargo soothfast docs reference Measurements and verified claims come from the latest baseline; CI gates them.

soothfast_sdk#

SdkFileSet struct#

rust · ignore
pub struct SdkFileSet

Rendered SDK files, keyed by path relative to the output directory.

SdkKind enum#

rust · ignore
pub enum SdkKind

A language the SDK engine can emit.

SdkOptions struct#

rust · ignore
pub struct SdkOptions

Everything an emitter needs that the operations don't carry.

soothfast_sdk::envtemplate#

EnvVar struct#

rust · ignore
pub struct EnvVar

One environment variable the embedded server reads.

markdown_table function#

rust · ignore
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#

rust · ignore
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#

rust · ignore
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.

verified claims
complexityclaimed O(n); growth drift x1.31 over sizes [16, 64, 256] (limit x2.5)
measured as `soothfast_sdk::bench_lower`
median walltime (ns)1360282
p99 walltime (ns)1384513
allocations/iter23907
allocated bytes/iter2064788

soothfast_sdk::model#

Field struct#

rust · ignore
pub struct Field

One field of a [Model].

Method struct#

rust · ignore
pub struct Method

One client method, lowered from an operation.

Model struct#

rust · ignore
pub struct Model

A named object schema, emitted as a class/interface.

Param struct#

rust · ignore
pub struct Param

One parameter of a [Method].

ParamLoc enum#

rust · ignore
pub enum ParamLoc

Where a request parameter travels.

Sdk struct#

rust · ignore
pub struct Sdk

The whole lowered SDK.

Ty enum#

rust · ignore
pub enum Ty

A wire type, lowered from JSON Schema.

soothfast_sdk::target#

Target struct#

rust · ignore
pub struct Target

One cross-compilation target and how each ecosystem names it.

built with cargo soothfast docs build source