Trait ConfigNamespaceServer

Source
pub trait ConfigNamespaceServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_current_timestamp<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_show_storage_logs<'life0, 'async_trait>(
        &'life0 self,
        value: ShowStorageLogs,
    ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_show_vm_details<'life0, 'async_trait>(
        &'life0 self,
        value: ShowVMDetails,
    ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_show_gas_details<'life0, 'async_trait>(
        &'life0 self,
        value: ShowGasDetails,
    ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_show_node_config<'life0, 'async_trait>(
        &'life0 self,
        value: bool,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_log_level<'life0, 'async_trait>(
        &'life0 self,
        level: LogLevel,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_logging<'life0, 'async_trait>(
        &'life0 self,
        directive: String,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

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

Server trait implementation for the ConfigNamespace RPC API.

Required Methods§

Source

fn get_current_timestamp<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the InMemoryNodeInner’s current_timestamp property

§Returns

The current current_timestamp value for the InMemoryNodeInner.

Source

fn set_show_storage_logs<'life0, 'async_trait>( &'life0 self, value: ShowStorageLogs, ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set show_storage_logs for the InMemoryNodeInner

§Parameters
  • value: A ShowStorageLogs enum to update show_storage_logs to
§Returns

The updated/current show_storage_logs value for the InMemoryNodeInner.

Source

fn set_show_vm_details<'life0, 'async_trait>( &'life0 self, value: ShowVMDetails, ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set show_vm_details for the InMemoryNodeInner

§Parameters
  • value: A ShowVMDetails enum to update show_vm_details to
§Returns

The updated/current show_vm_details value for the InMemoryNodeInner.

Source

fn set_show_gas_details<'life0, 'async_trait>( &'life0 self, value: ShowGasDetails, ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set show_gas_details for the InMemoryNodeInner

§Parameters
  • value: A ShowGasDetails enum to update show_gas_details to
§Returns

The updated/current show_gas_details value for the InMemoryNodeInner.

Source

fn set_show_node_config<'life0, 'async_trait>( &'life0 self, value: bool, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set show_node_config for the InMemoryNodeInner

§Parameters
  • value: A bool to update show_node_config to
§Returns

The updated/current show_node_config value for the InMemoryNodeInner.

Source

fn set_log_level<'life0, 'async_trait>( &'life0 self, level: LogLevel, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the logging for the InMemoryNodeInner

§Parameters
  • level: The log level to set. One of: [“trace”, “debug”, “info”, “warn”, “error”]
§Returns

true if the operation succeeded, false otherwise.

Source

fn set_logging<'life0, 'async_trait>( &'life0 self, directive: String, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the logging for the InMemoryNodeInner

§Parameters
  • level: The logging directive to set. Example:
    • “my_crate=debug”
    • “my_crate::module=trace”
    • “my_crate=debug,other_crate=warn”
§Returns

true if the operation succeeded, false otherwise.

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§