tuus
Translation status: 简体中文 reader-locale proof. Code fences render through the zh-Hans pipeline; prose is canonical Latin.
typed inbound sermo stream view
Syntax:
Category#
endpoint
Related#
Examples#
radix/corpus/ad/sermo-tuus.fab (canonical · method)#
typed inbound sermo stream view
# =============================================================================
# tuus — typed inbound sermo stream view.
# =============================================================================
#
# What this teaches:
# • Typed inbound stream — `s.tuus<T>()` creates a typed view over the
# incoming frames of a sermo connection
# • Cursor consumption — cursor() yields frames that can be iterated with
# `itera ex`
#
# Common mistakes:
# • confusing ad route syntax — accessing `tuus<T>` stream after `fini()` has been called leaves no usable data
#
# See also: ad, sermo, scrinium, cursor
# =============================================================================
# sermo.tuus<T>() — typed inbound frame stream
main {
const _ s ← call 'runtime:echo' ("salve")
for from s.tuus<string>().cursor() const frame {
assert frame.data ≡ "salve"
}
}Expected output: