Skip to main content

Reassemble

Trait Reassemble 

Source
pub trait Reassemble<Frame>:
    Default
    + WasmCompatSend
    + 'static {
    // Required methods
    fn absorb(&mut self, frame: &Frame);
    fn finish(self) -> Value;
}
Expand description

Rebuilds one reply’s provider document from the frames it arrived in.

A fresh value per reply. absorb sees every frame the driver reads, in arrival order, including frames the decoder classifies as unknown or corrupt. finish runs once, when the reply ends, fails or is cut short; a reply that did not end yields the document so far.

Required Methods§

Source

fn absorb(&mut self, frame: &Frame)

Absorb one frame of the reply.

Source

fn finish(self) -> Value

The document the absorbed frames add up to. Null records none.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§