pub struct Line(/* private fields */);
Expand description
A codec working with JSONRPC 2.0 messages.
This produces or encodes Message. It separates the records by newlines, so it can recover from syntax error.s
Note that the produced items is a Result
, to allow not terminating the stream on
protocol-level errors.
Implementations§
Trait Implementations§
Source§impl Decoder for Line
impl Decoder for Line
Source§fn decode(&mut self, src: &mut BytesMut) -> IoResult<Option<Parsed>>
fn decode(&mut self, src: &mut BytesMut) -> IoResult<Option<Parsed>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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