encoding/yaml
CUE v0.18.0
Functions
Marshal
cue
Marshal: func(v: _) -> stringMarshal returns the YAML encoding of v.
MarshalStream
cue
MarshalStream: func(v: _) -> stringMarshalStream returns the YAML encoding of v.
Unmarshal
cue
Unmarshal: func(data: bytes | string) -> _Unmarshal parses the YAML to a CUE expression.
UnmarshalStream
cue
UnmarshalStream: func(data: bytes | string) -> _UnmarshalStream parses the YAML to a CUE list expression on success.
Validate validator
validator form
cue
func(v: _ @schema()) -> validator(bytes | string)call form
cue
func(b: bytes | string, v: _ @schema()) -> boolValidate validates YAML and confirms it is an instance of schema. If the YAML source is a stream, every object must match v.
ValidatePartial validator
validator form
cue
func(v: _ @schema()) -> validator(bytes | string)call form
cue
func(b: bytes | string, v: _ @schema()) -> boolValidatePartial validates YAML and confirms it matches the constraints specified by v using unification. This means that b must be consistent with, but does not have to be an instance of v. If the YAML source is a stream, every object must match v.