filament-utilities · rpc
Source declarations, signatures and documentation for rpc.
Read the current implementation boundaries before integration. This reference reproduces declarations; it omits source comments whose examples or readiness claims have not been verified.
Source: sigil/weave/filament/filament-utilities/src/rpc.rs. SHA-256: bf6900609737a5cf330180966e84a57135c4148405fc5de028460ab4f7bb980b.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
rpc::RpcRequest
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RpcRequest {
pub id: String,
pub method: String,
pub params: serde_json::Value
}Source line: 12.
rpc::RpcResponse
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RpcResponse {
pub id: String,
pub result: Option<serde_json::Value>,
pub error: Option<String>
}Source line: 20.
rpc::InterfaceStatus
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InterfaceStatus {
pub name: String,
pub mode: String,
pub enabled: bool,
pub online: bool,
pub tx_bytes: u64,
pub rx_bytes: u64,
pub tx_packets: u64,
pub rx_packets: u64,
pub peers: usize
}Source line: 28.
rpc::PathInfo
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PathInfo {
pub destination: String,
pub hops: u8,
pub interface: String,
pub expires_at: i64,
pub rtt_ms: Option<u32>
}Source line: 42.
rpc::IdentityInfo
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IdentityInfo {
pub hash: String,
pub public_key: String,
pub signing_key: String
}Source line: 52.
rpc::RpcClient
pub struct RpcClient {
}Source line: 59.
rpc::RpcClient::new
pub fn new(socket_path: impl AsRef<Path>) -> Self;Source line: 66.
rpc::RpcClient::with_timeout
pub fn with_timeout(mut self, timeout: Duration) -> Self;Source line: 74.
rpc::RpcClient::get_status
pub async fn get_status(&self) -> Result<serde_json::Value>;Source line: 134.
rpc::RpcClient::get_interfaces
pub async fn get_interfaces(&self) -> Result<Vec<InterfaceStatus>>;Source line: 142.
rpc::RpcClient::get_paths
pub async fn get_paths(&self) -> Result<Vec<PathInfo>>;Source line: 155.
rpc::RpcClient::probe_destination
pub async fn probe_destination(&self, destination: &str) -> Result<ProbeResult>;Source line: 166.
rpc::RpcClient::get_identity
pub async fn get_identity(&self) -> Result<IdentityInfo>;Source line: 179.
rpc::RpcClient::transfer_file
pub async fn transfer_file(
&self,
destination: &str,
file_path: &str,
) -> Result<TransferResult>;Source line: 190.
rpc::ProbeResult
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProbeResult {
pub reachable: bool,
pub rtt_ms: Option<u32>,
pub hops: Option<u8>,
pub error: Option<String>
}Source line: 215.
rpc::TransferResult
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TransferResult {
pub success: bool,
pub bytes_transferred: u64,
pub duration_ms: u64,
pub error: Option<String>
}Source line: 224.