pub enum RawItem {
Data {
content_type: Option<Arc<str>>,
content: Content,
},
Progress {
content_type: Option<Arc<str>>,
content: Content,
},
Error {
message: Option<String>,
code: Option<String>,
recoverable: bool,
error: Box<RemoteError>,
},
Request,
Done,
}Expand description
One item of a response stream as a typed client reads it (PERF.115-36):
a StreamItem whose content is still the wire’s JSON (Content), and
nothing read that a typed decode does not use: no metadata, no request’s
data. Transport::call_raw yields these and
decode_raw turns them into events; a consumer that
wants the metadata, or answers requests, reads StreamItems.
Variants§
Data
A payload item: its content, and its content_type, which every item
of a call shares.
Progress
A progress report: the method’s progress value P (a Content,
decoded when an opted-in caller reads it), its content_type the
call’s. Never terminates the stream.
Error
The call failed: its typed RemoteError (RETURNS-6), beside
spec/05’s message and code. Terminates the stream.
Request
A server-to-client request. A typed client has no answer channel and skips it.
Done
Normal end of stream.