mod client

module client

Structs and Unions

struct RpcClient

A synchronous RPC client that wraps the Cap’n Proto async transport.

Implementations

impl RpcClient

Functions

fn new(addr: &str) -> Result<Self, Box<dyn std::error::Error>>

Creates a new RPC client targeting the given address.

fn parse_bytes(&self, data: &[u8]) -> Result<Vec<ConFrame>, Box<dyn std::error::Error>>

Parses raw file bytes via the RPC server.

fn parse_file(&self, path: &std::path::Path) -> Result<Vec<ConFrame>, Box<dyn std::error::Error>>

Parses a file by sending its contents to the RPC server.

Returns the parsed frames.

fn write_frames(&self, frames: &[ConFrame]) -> Result<Vec<u8>, Box<dyn std::error::Error>>

Writes frames by sending them to the RPC server, receiving serialized output.