pub struct FrameCodec { /* private fields */ }Expand description
Tokio codec for RpcMessage over a length-prefixed stream.
Frame layout: [4-byte BE length][msgpack payload]. Maximum frame size
is MAX_FRAME_SIZE.
Use this for both the task channel and the control channel — they share the same wire format.
Implementations§
Source§impl FrameCodec
impl FrameCodec
Trait Implementations§
Source§impl Decoder for FrameCodec
impl Decoder for FrameCodec
Source§type Item = RpcMessage
type Item = RpcMessage
The type of decoded frames.
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<RpcMessage>>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<RpcMessage>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl Default for FrameCodec
impl Default for FrameCodec
Auto Trait Implementations§
impl Freeze for FrameCodec
impl RefUnwindSafe for FrameCodec
impl Send for FrameCodec
impl Sync for FrameCodec
impl Unpin for FrameCodec
impl UnsafeUnpin for FrameCodec
impl UnwindSafe for FrameCodec
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