Skip to main content

write_text

Function write_text 

Source
pub fn write_text(stream: &mut dyn Write, text: &str) -> Result<()>
Expand description

Write one text frame, refusing a payload over MAX_FRAME_BYTES.

The refusal is not a truncation: a client that received half a JSON document would have to guess. The store does not bound every event — a handler’s output and a caller’s input are unbounded values — so the live channel measures an event before it writes it and replaces such a value with a reference to where it is read (super::events::Withheld); this refusal is the last line, not the bound.