pub enum KindType {
Sequence
Scalar
Mapping
}pub struct ParseOptions {
schema : String
allow_duplicate_keys : Bool
on_warning : (YamlError) -> Unit?
}type ParserStatepub struct Position {
line : Int
column : Int
index : Int
}pub enum SchemaType {
FailSafe
Json
Core
Default
Extended
}impl Eq for SchemaTypeimpl Show for SchemaTypepub struct StringifyOptions {
indent : Int
array_indent : Bool
skip_invalid : Bool
flow_level : Int
styles : Map[String, StyleVariant]
schema : String
sort_keys : Bool
line_width : Int
use_anchors : Bool
compat_mode : Bool
condense_flow : Bool
}impl Show for StringifyOptionspub enum StyleVariant {
Lowercase
Uppercase
Camelcase
Decimal
Binary
Octal
Hexadecimal
Literal
Folded
Plain
DoubleQuoted
SingleQuoted
}impl Eq for StyleVariantimpl Show for StyleVariantpub enum YamlError {
ParseError(String, Int, Int)
TypeError(String)
SyntaxError(String)
ResolveError(String)
ConstructError(String)
}pub struct YamlType[T] {
tag : String
kind : KindType
predicate : (YamlValue) -> Bool
represent : (T, StyleVariant?) -> String?
default_style : StyleVariant?
resolve : (YamlValue) -> Bool
construct : (YamlValue) -> T
}fn codepoint_to_string(codepoint : Int) -> Stringfn count_leading_whitespace(s : String) -> Intfn decimal_char_to_number(c : Int) -> Intfn escape_yaml_string(s : String) -> Stringfn is_decimal_digit(c : Int) -> Boolfn is_document_end(line : String) -> Boolfn is_document_start(line : String) -> Boolfn is_empty_line(line : String) -> Boolfn is_whitespace_or_eol(c : Int) -> Boolfn normalize_line_endings(input : String) -> Stringfn pad_string(s : String, width : Int) -> Stringfn process_folded_string(s : String) -> Stringfn process_literal_string(s : String) -> Stringfn sanitize_input(input : String) -> Stringfn string_ends_with(s : String, suffix : String) -> Boolfn unescape_yaml_string(s : String) -> String