pub struct MinerAppConfig {
pub bin_name: String,
pub root_dir: PathBuf,
pub data_dir: PathBuf,
pub chain: ChainConfig,
pub logger: LogConfig,
pub metrics: MetricsConfig,
pub memory_tracker: MemoryTrackerConfig,
pub miner: MinerConfig,
}Expand description
The miner config file for ckb miner. Usually it is the ckb-miner.toml in the CKB root
directory.
Attention: Changing the order of fields will break integration test, see module doc.
Fields§
§bin_name: StringThe binary name.
root_dir: PathBufThe root directory.
data_dir: PathBufThe data directory.
chain: ChainConfigChain config options.
logger: LogConfigLogger config options.
metrics: MetricsConfigMetrics options.
Developers can collect metrics for performance tuning and troubleshooting.
memory_tracker: MemoryTrackerConfigMemory tracker options.
Developers can enable memory tracker to analyze the process memory usage.
miner: MinerConfigThe miner config options.
Implementations§
Source§impl MinerAppConfig
impl MinerAppConfig
Sourcepub fn load_from_slice(slice: &[u8]) -> Result<Self, ExitCode>
pub fn load_from_slice(slice: &[u8]) -> Result<Self, ExitCode>
Load a new instance from a file.
Trait Implementations§
Source§impl Clone for MinerAppConfig
impl Clone for MinerAppConfig
Source§fn clone(&self) -> MinerAppConfig
fn clone(&self) -> MinerAppConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MinerAppConfig
impl Debug for MinerAppConfig
Auto Trait Implementations§
impl Freeze for MinerAppConfig
impl RefUnwindSafe for MinerAppConfig
impl Send for MinerAppConfig
impl Sync for MinerAppConfig
impl Unpin for MinerAppConfig
impl UnwindSafe for MinerAppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more