method Decoder.endMap
Ends reading the map that beginMap started, after its entries were read. The default does nothing.
Example:
use std.ser { Codec, Encoder, Decoder, Schema, encode, decode, hex, EncodeError, DecodeError }
fn readEmptyMap(r: &var Decoder) -> () | DecodeError {
let n = r.beginMap()?
if n != 0 { fail DecodeError.Malformed(msg: "expected an empty map") }
r.endMap()
}var fn endMap()Since. 1.0.0-beta
Effects
none declared (pure unless the body says otherwise)
Defined in: std/ser/ser.oxl:1821