moon/fory Apache Fory · MoonBit

API · fn

read_message

Messages · defined at codec.mbt:517

pub fn[T : Codec] read_message(Reader) -> T raise

Read one complete message: the root's flag first, then the type ID.

A value that is not there comes back as this type read under NONE, which every type answers in its own way: Value answers Null, and a type that cannot be absent refuses. A reference where the root belongs is a message that begins by pointing at itself, and is refused.

Generated from src/pkg.generated.mbti and the doc comments beside this declaration.