pub enum StreamFields {
Data {
seq: u64,
encoding: StreamEncoding,
body: Value,
},
End {
seq: u64,
role: StreamRole,
},
Error {
seq: u64,
code: String,
message: String,
},
Reply {
seq: u64,
payload: Value,
},
SealedData {
seq: u64,
encoding: StreamEncoding,
sealed: Sealed,
},
SealedError {
seq: u64,
sealed: Sealed,
},
SealedReply {
seq: u64,
sealed: Sealed,
},
}Expand description
A stream frame’s own fields, each with its sender’s seq on the stream.
Variants§
Data
One chunk: a raw body is a byte string, a msgpack body any value the wire carries.
End
The last frame of its sender’s side.
Error
An error: a code of at most 64 bytes and a message of at most 256.
Reply
A provider’s terminal value for a client_stream or bidi stream.
SealedData
A STREAM_DATA whose body is sealed end to end, sent in place of the body; its encoding still travels.
SealedError
A STREAM_ERROR whose code and message are sealed end to end, sent in place of both.
SealedReply
A STREAM_REPLY whose payload is sealed end to end, sent in place of the payload.
Implementations§
Trait Implementations§
Source§impl Clone for StreamFields
impl Clone for StreamFields
Source§impl Debug for StreamFields
impl Debug for StreamFields
Source§impl PartialEq for StreamFields
impl PartialEq for StreamFields
impl StructuralPartialEq for StreamFields
Auto Trait Implementations§
impl Freeze for StreamFields
impl RefUnwindSafe for StreamFields
impl Send for StreamFields
impl Sync for StreamFields
impl Unpin for StreamFields
impl UnsafeUnpin for StreamFields
impl UnwindSafe for StreamFields
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more