kaspa-grpc-core 0.0.2

Kaspa gRPC core
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::from;
use crate::protowire;

// ----------------------------------------------------------------------------
// rpc_core to protowire
// ----------------------------------------------------------------------------

from!(item: kaspa_rpc_core::RpcError, protowire::RpcError, { Self { message: item.to_string() } });
from!(item: &kaspa_rpc_core::RpcError, protowire::RpcError, { Self { message: item.to_string() } });

// ----------------------------------------------------------------------------
// protowire to rpc_core
// ----------------------------------------------------------------------------

from!(item: &protowire::RpcError, kaspa_rpc_core::RpcError, { kaspa_rpc_core::RpcError::from(item.message.to_string()) });