pub struct JsonRpcLineCodec;Expand description
Protocol json rpc line codec value used by toolkit JSON-RPC adapters. Constructing the value prepares protocol data; endpoint and transport methods own transcript or I/O effects.
Implementations§
Source§impl JsonRpcLineCodec
impl JsonRpcLineCodec
Sourcepub fn write_frame(
writer: &mut impl Write,
frame: &JsonRpcFrame,
) -> Result<(), AgentError>
pub fn write_frame( writer: &mut impl Write, frame: &JsonRpcFrame, ) -> Result<(), AgentError>
Writes one newline-delimited JSON-RPC frame or raw line to the caller-provided writer. It does not launch a process, open sockets, or persist transport state.
Sourcepub fn read_frame(
reader: &mut impl BufRead,
) -> Result<Option<JsonRpcFrame>, AgentError>
pub fn read_frame( reader: &mut impl BufRead, ) -> Result<Option<JsonRpcFrame>, AgentError>
Reads one newline-delimited JSON-RPC frame or raw line from the caller-provided reader. It does not launch a process, open sockets, or persist transport state.
Sourcepub fn write_raw_line(
writer: &mut impl Write,
line: &str,
) -> Result<(), AgentError>
pub fn write_raw_line( writer: &mut impl Write, line: &str, ) -> Result<(), AgentError>
Writes one newline-delimited JSON-RPC frame or raw line to the caller-provided writer. It does not launch a process, open sockets, or persist transport state.
Trait Implementations§
Source§impl Clone for JsonRpcLineCodec
impl Clone for JsonRpcLineCodec
Source§fn clone(&self) -> JsonRpcLineCodec
fn clone(&self) -> JsonRpcLineCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonRpcLineCodec
impl Debug for JsonRpcLineCodec
Source§impl Default for JsonRpcLineCodec
impl Default for JsonRpcLineCodec
Source§fn default() -> JsonRpcLineCodec
fn default() -> JsonRpcLineCodec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JsonRpcLineCodec
impl RefUnwindSafe for JsonRpcLineCodec
impl Send for JsonRpcLineCodec
impl Sync for JsonRpcLineCodec
impl Unpin for JsonRpcLineCodec
impl UnsafeUnpin for JsonRpcLineCodec
impl UnwindSafe for JsonRpcLineCodec
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