pub struct EngineConfig {
pub verifier: Box<dyn Verifier>,
pub pacemaker: Option<PacemakerConfig>,
pub persistence: Option<Box<dyn StatePersistence>>,
}Expand description
Configuration for ConsensusEngine.
Fields§
§verifier: Box<dyn Verifier>§pacemaker: Option<PacemakerConfig>§persistence: Option<Box<dyn StatePersistence>>Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn new(verifier: Box<dyn Verifier>) -> Self
pub fn new(verifier: Box<dyn Verifier>) -> Self
Create an EngineConfig with the given verifier and defaults
(no custom pacemaker, no persistence).
Sourcepub fn with_pacemaker(self, pacemaker: PacemakerConfig) -> Self
pub fn with_pacemaker(self, pacemaker: PacemakerConfig) -> Self
Set a custom pacemaker configuration.
Sourcepub fn with_persistence(self, persistence: Box<dyn StatePersistence>) -> Self
pub fn with_persistence(self, persistence: Box<dyn StatePersistence>) -> Self
Set a state persistence backend.
Auto Trait Implementations§
impl Freeze for EngineConfig
impl !RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl !Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin for EngineConfig
impl !UnwindSafe for EngineConfig
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