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

pub enum RpcRequest<I> {
    SubmitDeploy {
        deploy: Box<Deploy>,
        responder: Responder<Result<(), Error>>,
    },
    GetBlock {
        maybe_id: Option<BlockIdentifier>,
        responder: Responder<Option<(LinearBlock, BlockSignatures)>>,
    },
    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>>,
    },
    GetBids {
        state_root_hash: Digest,
        responder: Responder<Result<GetBidsResult, Error>>,
    },
    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>>,
    },
}
Expand description

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_identifier is Some, return the specified block if it exists, else None. If maybe_identifier is None, return the latest block.

Fields of GetBlock

maybe_id: Option<BlockIdentifier>

The identifier (can either be a hash or the height) of the block to be retrieved.

responder: Responder<Option<(LinearBlock, BlockSignatures)>>

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.

GetBids

Get the bids at the given root hash.

Fields of GetBids

state_root_hash: Digest

The global state hash.

responder: Responder<Result<GetBidsResult, Error>>

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

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Converts the given value to a String. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more