pub struct RpcCodec;Expand description
RPC message codec
Protocol format:
+--------+--------+--------+--------+
| Length (4 bytes, big-endian) |
+--------+--------+--------+--------+
| JSON-encoded message |
| ... |
+-----------------------------------+Implementations§
Trait Implementations§
Source§impl Decoder for RpcCodec
impl Decoder for RpcCodec
Source§type Item = RpcRequest
type Item = RpcRequest
The type of decoded frames.
Source§type Error = ControllerError
type Error = ControllerError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl Freeze for RpcCodec
impl RefUnwindSafe for RpcCodec
impl Send for RpcCodec
impl Sync for RpcCodec
impl Unpin for RpcCodec
impl UnwindSafe for RpcCodec
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