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