Trait cuprate_rpc_types::RpcCall

source ·
pub trait RpcCall {
    const IS_RESTRICTED: bool;
    const IS_EMPTY: bool;
}
Expand description

Metadata about an RPC call.

This trait describes some metadata about RPC requests.

It is implemented on all request types within:

See also RpcCallValue for a dynamic by-value version of this trait.

Required Associated Constants§

source

const IS_RESTRICTED: bool

Is true if this RPC method should only be allowed on local servers.

If this is false, it should be okay to execute the method even on restricted RPC servers.

use cuprate_rpc_types::{RpcCall, json::*};

// Allowed method, even on restricted RPC servers (18089).
assert!(!GetBlockCountRequest::IS_RESTRICTED);

// Restricted methods, only allowed
// for unrestricted RPC servers (18081).
assert!(GetConnectionsRequest::IS_RESTRICTED);
source

const IS_EMPTY: bool

Is true if this RPC method has no inputs, i.e. it is a struct with no fields.

use cuprate_rpc_types::{RpcCall, json::*};

assert!(GetBlockCountRequest::IS_EMPTY);
assert!(!OnGetBlockHashRequest::IS_EMPTY);

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RpcCall for GetBlocksByHeightRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetBlocksRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetHashesRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetOutputIndexesRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for cuprate_rpc_types::bin::GetOutsRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for cuprate_rpc_types::bin::GetTransactionPoolHashesRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for AddAuxPowRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for BannedRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for CalcPowRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for FlushCacheRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for FlushTransactionPoolRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GenerateBlocksRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetAlternateChainsRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetBansRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetBlockCountRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetBlockHeaderByHashRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetBlockHeaderByHeightRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetBlockHeadersRangeRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetBlockRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetBlockTemplateRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetCoinbaseTxSumRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetConnectionsRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetFeeEstimateRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetInfoRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetLastBlockHeaderRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetMinerDataRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetOutputDistributionRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetOutputHistogramRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetTransactionPoolBacklogRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetTxIdsLooseRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetVersionRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for HardForkInfoRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for OnGetBlockHashRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for PruneBlockchainRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for RelayTxRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SetBansRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SubmitBlockRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SyncInfoRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetAltBlocksHashesRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetHeightRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetLimitRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetNetStatsRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for cuprate_rpc_types::other::GetOutsRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetPeerListRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for GetPublicNodesRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for cuprate_rpc_types::other::GetTransactionPoolHashesRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetTransactionPoolRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetTransactionPoolStatsRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for GetTransactionsRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for InPeersRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for IsKeyImageSpentRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for MiningStatusRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for OutPeersRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for PopBlocksRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SaveBcRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SendRawTransactionRequest

source§

const IS_RESTRICTED: bool = false

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SetBootstrapDaemonRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SetLimitRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SetLogCategoriesRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SetLogHashRateRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for SetLogLevelRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for StartMiningRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false

source§

impl RpcCall for StopDaemonRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for StopMiningRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = true

source§

impl RpcCall for UpdateRequest

source§

const IS_RESTRICTED: bool = true

source§

const IS_EMPTY: bool = false