checkpoint
This commit is contained in:
@@ -14,6 +14,9 @@ impl RPCAnswer {
|
||||
pub fn detail(&self) -> &RPCAnswerDetail {
|
||||
&self.detail
|
||||
}
|
||||
pub fn into_detail(self) -> RPCAnswerDetail {
|
||||
self.detail
|
||||
}
|
||||
pub fn desc(&self) -> &'static str {
|
||||
self.detail.desc()
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ impl RPCOperation {
|
||||
&self.kind
|
||||
}
|
||||
|
||||
pub fn into_kind(&self) -> RPCOperationKind {
|
||||
self.kind
|
||||
}
|
||||
|
||||
pub fn decode(
|
||||
operation_reader: &veilid_capnp::operation::Reader,
|
||||
sender_node_id: &DHTKey,
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationCancelTunnelQ {
|
||||
id: TunnelId,
|
||||
pub id: TunnelId,
|
||||
}
|
||||
|
||||
impl RPCOperationCancelTunnelQ {
|
||||
|
||||
@@ -3,10 +3,10 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationCompleteTunnelQ {
|
||||
id: TunnelId,
|
||||
local_mode: TunnelMode,
|
||||
depth: u8,
|
||||
endpoint: TunnelEndpoint,
|
||||
pub id: TunnelId,
|
||||
pub local_mode: TunnelMode,
|
||||
pub depth: u8,
|
||||
pub endpoint: TunnelEndpoint,
|
||||
}
|
||||
|
||||
impl RPCOperationCompleteTunnelQ {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationFindBlockQ {
|
||||
block_id: DHTKey,
|
||||
pub block_id: DHTKey,
|
||||
}
|
||||
|
||||
impl RPCOperationFindBlockQ {
|
||||
@@ -28,9 +28,9 @@ impl RPCOperationFindBlockQ {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationFindBlockA {
|
||||
data: Vec<u8>,
|
||||
suppliers: Vec<PeerInfo>,
|
||||
peers: Vec<PeerInfo>,
|
||||
pub data: Vec<u8>,
|
||||
pub suppliers: Vec<PeerInfo>,
|
||||
pub peers: Vec<PeerInfo>,
|
||||
}
|
||||
|
||||
impl RPCOperationFindBlockA {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationFindNodeQ {
|
||||
node_id: DHTKey,
|
||||
pub node_id: DHTKey,
|
||||
}
|
||||
|
||||
impl RPCOperationFindNodeQ {
|
||||
@@ -26,7 +26,7 @@ impl RPCOperationFindNodeQ {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationFindNodeA {
|
||||
peers: Vec<PeerInfo>,
|
||||
pub peers: Vec<PeerInfo>,
|
||||
}
|
||||
|
||||
impl RPCOperationFindNodeA {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationGetValueQ {
|
||||
key: ValueKey,
|
||||
pub key: ValueKey,
|
||||
}
|
||||
|
||||
impl RPCOperationGetValueQ {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationNodeInfoUpdate {
|
||||
signed_node_info: SignedNodeInfo,
|
||||
pub signed_node_info: SignedNodeInfo,
|
||||
}
|
||||
|
||||
impl RPCOperationNodeInfoUpdate {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationReturnReceipt {
|
||||
receipt: Vec<u8>,
|
||||
pub receipt: Vec<u8>,
|
||||
}
|
||||
|
||||
impl RPCOperationReturnReceipt {
|
||||
|
||||
@@ -3,9 +3,9 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct RoutedOperation {
|
||||
signatures: Vec<DHTSignature>,
|
||||
nonce: Nonce,
|
||||
data: Vec<u8>,
|
||||
pub signatures: Vec<DHTSignature>,
|
||||
pub nonce: Nonce,
|
||||
pub data: Vec<u8>,
|
||||
}
|
||||
|
||||
impl RoutedOperation {
|
||||
@@ -62,8 +62,8 @@ impl RoutedOperation {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationRoute {
|
||||
safety_route: SafetyRoute,
|
||||
operation: RoutedOperation,
|
||||
pub safety_route: SafetyRoute,
|
||||
pub operation: RoutedOperation,
|
||||
}
|
||||
|
||||
impl RPCOperationRoute {
|
||||
|
||||
@@ -3,8 +3,8 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationSetValueQ {
|
||||
key: ValueKey,
|
||||
value: ValueData,
|
||||
pub key: ValueKey,
|
||||
pub value: ValueData,
|
||||
}
|
||||
|
||||
impl RPCOperationSetValueQ {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationSignal {
|
||||
signal_info: SignalInfo,
|
||||
pub signal_info: SignalInfo,
|
||||
}
|
||||
|
||||
impl RPCOperationSignal {
|
||||
|
||||
@@ -3,9 +3,9 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationStartTunnelQ {
|
||||
id: TunnelId,
|
||||
local_mode: TunnelMode,
|
||||
depth: u8,
|
||||
pub id: TunnelId,
|
||||
pub local_mode: TunnelMode,
|
||||
pub depth: u8,
|
||||
}
|
||||
|
||||
impl RPCOperationStartTunnelQ {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationStatusQ {
|
||||
node_status: NodeStatus,
|
||||
pub node_status: NodeStatus,
|
||||
}
|
||||
|
||||
impl RPCOperationStatusQ {
|
||||
@@ -26,8 +26,8 @@ impl RPCOperationStatusQ {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationStatusA {
|
||||
node_status: NodeStatus,
|
||||
sender_info: SenderInfo,
|
||||
pub node_status: NodeStatus,
|
||||
pub sender_info: SenderInfo,
|
||||
}
|
||||
|
||||
impl RPCOperationStatusA {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationSupplyBlockQ {
|
||||
block_id: DHTKey,
|
||||
pub block_id: DHTKey,
|
||||
}
|
||||
|
||||
impl RPCOperationSupplyBlockQ {
|
||||
|
||||
@@ -3,9 +3,9 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationValidateDialInfo {
|
||||
dial_info: DialInfo,
|
||||
receipt: Vec<u8>,
|
||||
redirect: bool,
|
||||
pub dial_info: DialInfo,
|
||||
pub receipt: Vec<u8>,
|
||||
pub redirect: bool,
|
||||
}
|
||||
|
||||
impl RPCOperationValidateDialInfo {
|
||||
|
||||
@@ -3,8 +3,8 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationValueChanged {
|
||||
key: ValueKey,
|
||||
value: ValueData,
|
||||
pub key: ValueKey,
|
||||
pub value: ValueData,
|
||||
}
|
||||
|
||||
impl RPCOperationValueChanged {
|
||||
|
||||
@@ -3,7 +3,7 @@ use rpc_processor::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationWatchValueQ {
|
||||
key: ValueKey,
|
||||
pub key: ValueKey,
|
||||
}
|
||||
|
||||
impl RPCOperationWatchValueQ {
|
||||
@@ -26,8 +26,8 @@ impl RPCOperationWatchValueQ {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationWatchValueA {
|
||||
expiration: u64,
|
||||
peers: Vec<PeerInfo>,
|
||||
pub expiration: u64,
|
||||
pub peers: Vec<PeerInfo>,
|
||||
}
|
||||
|
||||
impl RPCOperationWatchValueA {
|
||||
|
||||
@@ -18,6 +18,12 @@ impl RPCQuestion {
|
||||
pub fn detail(&self) -> &RPCQuestionDetail {
|
||||
&self.detail
|
||||
}
|
||||
pub fn into_detail(self) -> RPCQuestionDetail {
|
||||
self.detail
|
||||
}
|
||||
pub fn into_respond_to_detail(self) -> (RespondTo, RPCQuestionDetail) {
|
||||
(self.respond_to, self.detail)
|
||||
}
|
||||
pub fn desc(&self) -> &'static str {
|
||||
self.detail.desc()
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ impl RPCStatement {
|
||||
pub fn detail(&self) -> &RPCStatementDetail {
|
||||
&self.detail
|
||||
}
|
||||
pub fn into_detail(self) -> RPCQuestionDetail {
|
||||
self.detail
|
||||
}
|
||||
pub fn desc(&self) -> &'static str {
|
||||
self.detail.desc()
|
||||
}
|
||||
|
||||
@@ -47,7 +47,10 @@ pub fn decode_tunnel_endpoint(
|
||||
reader: &veilid_capnp::tunnel_endpoint::Reader,
|
||||
) -> Result<TunnelEndpoint, RPCError> {
|
||||
let mode = decode_tunnel_mode(reader.get_mode().map_err(map_error_capnp_notinschema!())?);
|
||||
let description = reader.get_description();
|
||||
let description = reader
|
||||
.get_description()
|
||||
.map_err(map_error_capnp_error!())?
|
||||
.to_owned();
|
||||
|
||||
Ok(TunnelEndpoint { mode, description })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user