pub enum Frame<'a> {
Single(Envelope<'a>),
Batch(Vec<Envelope<'a>>),
}Expand description
A whole frame: one message, or a batch of them.
The batch arm is recognised here rather than in a caller because a JSON
array is a different protocol question from anything else on this path:
2025-06-18 removed batching, and the decision belongs to the session’s
profile, not to the decoder. So the decoder reports the shape and leaves
the policy to crate::application::jsonrpc::BatchPolicy.
Variants§
Single(Envelope<'a>)
A single message.
Batch(Vec<Envelope<'a>>)
A batch, in the order the sender wrote it.
Implementations§
Source§impl<'a> Frame<'a>
impl<'a> Frame<'a>
Sourcepub fn into_envelopes(self) -> Vec<Envelope<'a>>
pub fn into_envelopes(self) -> Vec<Envelope<'a>>
Every message in the frame, in order, moving each one out.
The owned counterpart to envelopes. Routing needs
it: the id of a request has to be moved into the reply, and an id whose
text needed unescaping owns a String, so routing cannot borrow.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Frame<'a>
impl<'a> RefUnwindSafe for Frame<'a>
impl<'a> Send for Frame<'a>
impl<'a> Sync for Frame<'a>
impl<'a> Unpin for Frame<'a>
impl<'a> UnsafeUnpin for Frame<'a>
impl<'a> UnwindSafe for Frame<'a>
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