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: bytes) -> result<_, stream-error>;Write 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-content
send-content: func(output: output-stream, content: data, options: option<call-tool-result-options>) -> result<_, stream-error>;Send a complete structured content result and close the output stream.
F open
open: func(output: output-stream, initial: data) -> result<structured-writer, stream-error>;Start the stream of structured content.