CfxFilterRpcServer

Trait CfxFilterRpcServer 

Source
pub trait CfxFilterRpcServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn new_filter(&self, filter: CfxRpcLogFilter) -> JsonRpcResult<H128>;
    fn new_block_filter(&self) -> JsonRpcResult<H128>;
    fn new_pending_transaction_filter(&self) -> JsonRpcResult<H128>;
    fn filter_changes(&self, filter_id: H128) -> JsonRpcResult<CfxFilterChanges>;
    fn filter_logs(&self, filter_id: H128) -> JsonRpcResult<Vec<RpcLog>>;
    fn uninstall_filter(&self, filter_id: H128) -> JsonRpcResult<bool>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the CfxFilterRpc RPC API.

Required Methods§

Source

fn new_filter(&self, filter: CfxRpcLogFilter) -> JsonRpcResult<H128>

Returns id of new filter.

Source

fn new_block_filter(&self) -> JsonRpcResult<H128>

Returns id of new block filter.

Source

fn new_pending_transaction_filter(&self) -> JsonRpcResult<H128>

Returns id of new pending transaction filter.

Source

fn filter_changes(&self, filter_id: H128) -> JsonRpcResult<CfxFilterChanges>

Returns filter changes since last poll.

Source

fn filter_logs(&self, filter_id: H128) -> JsonRpcResult<Vec<RpcLog>>

Returns all logs matching given filter (in a range ‘from’ - ‘to’).

Source

fn uninstall_filter(&self, filter_id: H128) -> JsonRpcResult<bool>

Uninstalls filter.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§