[][src]Enum casper_node::effect::requests::RpcRequest

#[must_use]pub enum RpcRequest<I> {
    SubmitDeploy {
        deploy: Box<Deploy>,
        responder: Responder<Result<(), Error>>,
    },
    GetBlock {
        maybe_id: Option<BlockIdentifier>,
        responder: Responder<Option<LinearBlock>>,
    },
    GetBlockTransfers {
        block_hash: BlockHash,
        responder: Responder<Option<Vec<Transfer>>>,
    },
    QueryGlobalState {
        state_root_hash: Digest,
        base_key: Key,
        path: Vec<String>,
        responder: Responder<Result<QueryResult, Error>>,
    },
    QueryEraValidators {
        state_root_hash: Digest,
        protocol_version: ProtocolVersion,
        responder: Responder<Result<EraValidators, GetEraValidatorsError>>,
    },
    QueryProtocolData {
        protocol_version: ProtocolVersion,
        responder: Responder<Result<Option<Box<ProtocolData>>, Error>>,
    },
    GetBalance {
        state_root_hash: Digest,
        purse_uref: URef,
        responder: Responder<Result<BalanceResult, Error>>,
    },
    GetDeploy {
        hash: DeployHash,
        responder: Responder<Option<(Deploy, DeployMetadata)>>,
    },
    GetPeers {
        responder: Responder<BTreeMap<I, String>>,
    },
    GetStatus {
        responder: Responder<StatusFeed<I>>,
    },
    GetMetrics {
        responder: Responder<Option<String>>,
    },
}

Abstract RPC request.

An RPC request is an abstract request that does not concern itself with serialization or transport.

Variants

SubmitDeploy

Submit a deploy to be announced.

Fields of SubmitDeploy

deploy: Box<Deploy>

The deploy to be announced.

responder: Responder<Result<(), Error>>

Responder to call.

GetBlock

If maybe_hash is Some, return the specified block if it exists, else None. If maybe_hash is None, return the latest block.

Fields of GetBlock

maybe_id: Option<BlockIdentifier>

The hash of the block to be retrieved.

responder: Responder<Option<LinearBlock>>

Responder to call with the result.

GetBlockTransfers

Return transfers for block by hash (if any).

Fields of GetBlockTransfers

block_hash: BlockHash

The hash of the block to retrieve transfers for.

responder: Responder<Option<Vec<Transfer>>>

Responder to call with the result.

QueryGlobalState

Query the global state at the given root hash.

Fields of QueryGlobalState

state_root_hash: Digest

The state root hash.

base_key: Key

Hex-encoded casper_types::Key.

path: Vec<String>

The path components starting from the key as base.

responder: Responder<Result<QueryResult, Error>>

Responder to call with the result.

QueryEraValidators

Query the global state at the given root hash.

Fields of QueryEraValidators

state_root_hash: Digest

The global state hash.

protocol_version: ProtocolVersion

The protocol version.

responder: Responder<Result<EraValidators, GetEraValidatorsError>>

Responder to call with the result.

QueryProtocolData

Query the contract runtime for protocol version data.

Fields of QueryProtocolData

protocol_version: ProtocolVersion

The protocol version.

responder: Responder<Result<Option<Box<ProtocolData>>, Error>>

Responder to call with the result.

GetBalance

Query the global state at the given root hash.

Fields of GetBalance

state_root_hash: Digest

The state root hash.

purse_uref: URef

The purse URef.

responder: Responder<Result<BalanceResult, Error>>

Responder to call with the result.

GetDeploy

Return the specified deploy and metadata if it exists, else None.

Fields of GetDeploy

hash: DeployHash

The hash of the deploy to be retrieved.

responder: Responder<Option<(Deploy, DeployMetadata)>>

Responder to call with the result.

GetPeers

Return the connected peers.

Fields of GetPeers

responder: Responder<BTreeMap<I, String>>

Responder to call with the result.

GetStatus

Return string formatted status or None if an error occurred.

Fields of GetStatus

responder: Responder<StatusFeed<I>>

Responder to call with the result.

GetMetrics

Return string formatted, prometheus compatible metrics or None if an error occurred.

Fields of GetMetrics

responder: Responder<Option<String>>

Responder to call with the result.

Trait Implementations

impl<I: Debug> Debug for RpcRequest<I>[src]

impl<I> Display for RpcRequest<I>[src]

impl From<RpcRequest<NodeId>> for Event[src]

Auto Trait Implementations

impl<I> !RefUnwindSafe for RpcRequest<I>[src]

impl<I> Send for RpcRequest<I> where
    I: Send
[src]

impl<I> Sync for RpcRequest<I> where
    I: Send
[src]

impl<I> Unpin for RpcRequest<I>[src]

impl<I> !UnwindSafe for RpcRequest<I>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]