pub trait MinerApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn set_extra(&self, record: Bytes) -> Result<bool, ErrorObject<'static>>;
fn set_gas_price(
&self,
gas_price: Uint<128, 2>,
) -> Result<bool, ErrorObject<'static>>;
fn set_gas_limit(
&self,
gas_price: Uint<128, 2>,
) -> Result<bool, ErrorObject<'static>>;
// 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) -> Result<bool, ErrorObject<'static>>
fn set_extra(&self, record: Bytes) -> Result<bool, ErrorObject<'static>>
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: Uint<128, 2>,
) -> Result<bool, ErrorObject<'static>>
fn set_gas_price( &self, gas_price: Uint<128, 2>, ) -> Result<bool, ErrorObject<'static>>
Sets the minimum accepted gas price for the miner.
Sourcefn set_gas_limit(
&self,
gas_price: Uint<128, 2>,
) -> Result<bool, ErrorObject<'static>>
fn set_gas_limit( &self, gas_price: Uint<128, 2>, ) -> Result<bool, ErrorObject<'static>>
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.