pub async fn read_frame<R>(
reader: &mut R,
) -> Result<FrameEnd, OperationOutcomeError>where
R: AsyncRead + Unpin,Expand description
Reads one MLLP frame from reader.
Returns FrameEnd::Closed when the stream ends between frames, and an
error when it ends within one, since a truncated message must not be
mistaken for a complete one.
ยงErrors
Returns an [OperationOutcomeError] when the stream does not begin with
<SB>, the frame exceeds MAX_FRAME_BYTES, the stream ends mid-frame, or
the underlying read fails.