Strata is pre-1.0. APIs, protocol, and storage format may change.
strata_protocol/error
Decode errors shared by the client and server frame decoders.
DecodeError
Section titled “DecodeError”An error that occurred while decoding a Strata frame.
pub type DecodeError { InvalidJson(reason: String) InvalidFormat(reason: String) UnsupportedVersion(found: Int, expected: Int) UnknownKind(kind: String)}InvalidJson(reason: String)
Section titled “InvalidJson(reason: String)”Raw JSON parse failed.
InvalidFormat(reason: String)
Section titled “InvalidFormat(reason: String)”JSON parsed but did not match the expected frame shape.
UnsupportedVersion(found: Int, expected: Int)
Section titled “UnsupportedVersion(found: Int, expected: Int)”Frame's v field disagrees with this protocol version.
UnknownKind(kind: String)
Section titled “UnknownKind(kind: String)”Frame's kind field is not recognised for this direction.
Functions
Section titled “Functions”format
Section titled “format”Format a DecodeError as a single human-readable line.
pub fn format(DecodeError) -> Stringjson_error_to_decode_error
Section titled “json_error_to_decode_error”Translate a gleam/json.DecodeError into a strata DecodeError.
pub fn json_error_to_decode_error(json.DecodeError) -> DecodeError