pub struct ChainConfig {
pub enabled: bool,
pub checkpoint_interval: u64,
pub chain_id: u32,
pub checkpoint_path: Option<String>,
}Expand description
Local chain configuration.
Fields§
§enabled: boolWhether the local chain is enabled.
checkpoint_interval: u64Maximum events before auto-checkpoint.
chain_id: u32Chain ID (0 = local node chain).
checkpoint_path: Option<String>Path to the chain checkpoint file for persistence across restarts.
If None, defaults to ~/.clawft/chain/local.json.
Implementations§
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn effective_checkpoint_path(&self) -> Option<String>
pub fn effective_checkpoint_path(&self) -> Option<String>
Returns the effective checkpoint path.
If checkpoint_path is set, returns it. Otherwise falls back to
~/.clawft/chain.json (requires the native feature for dirs).
Trait Implementations§
Source§impl Clone for ChainConfig
impl Clone for ChainConfig
Source§fn clone(&self) -> ChainConfig
fn clone(&self) -> ChainConfig
Returns a duplicate 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 ChainConfig
impl Debug for ChainConfig
Source§impl Default for ChainConfig
impl Default for ChainConfig
Source§impl<'de> Deserialize<'de> for ChainConfig
impl<'de> Deserialize<'de> for ChainConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChainConfig
impl RefUnwindSafe for ChainConfig
impl Send for ChainConfig
impl Sync for ChainConfig
impl Unpin for ChainConfig
impl UnsafeUnpin for ChainConfig
impl UnwindSafe for ChainConfig
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