Resource
structured-writer
Writer for streaming structured content.
resource structured-writer;F check-write
check-write: func() -> result<u64, stream-error>;Check readiness for writing. Returns the number of bytes that can be written without blocking.
F write
write: func(contents: list<u8>) -> result<_, stream-error>;Write structured data contents to the in-progress structured content value.
F close
close: func(options: option<call-tool-result-options>) -> result<_, stream-error>;Complete the result stream.
F send
send: func(id: id, output: output-stream, content: string, options: option<call-tool-result-options>) -> result<_, stream-error>;Send a complete structured content result and close the output stream.
F open
open: func(id: id, output: output-stream, initial: string) -> result<structured-writer, stream-error>;Start the stream of structured content.