pub trait MinerApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn set_extra(&self, record: Bytes) -> RpcResult<bool>;
fn set_gas_price(&self, gas_price: U128) -> RpcResult<bool>;
fn set_gas_limit(&self, gas_price: U128) -> RpcResult<bool>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the MinerApi
RPC API.
Required Methods§
Sourcefn set_extra(&self, record: Bytes) -> RpcResult<bool>
fn set_extra(&self, record: Bytes) -> RpcResult<bool>
Sets the extra data string that is included when this miner mines a block.
Returns an error if the extra data is too long.
Sourcefn set_gas_price(&self, gas_price: U128) -> RpcResult<bool>
fn set_gas_price(&self, gas_price: U128) -> RpcResult<bool>
Sets the minimum accepted gas price for the miner.
Sourcefn set_gas_limit(&self, gas_price: U128) -> RpcResult<bool>
fn set_gas_limit(&self, gas_price: U128) -> RpcResult<bool>
Sets the gaslimit to target towards during mining.
Provided Methods§
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.