pub struct PersistentNodeRunner<S: StateStore> { /* private fields */ }
Expand description
Enhanced NodeRunner with persistence integration
Implementations§
Source§impl<S: StateStore + 'static> PersistentNodeRunner<S>
impl<S: StateStore + 'static> PersistentNodeRunner<S>
Sourcepub fn set_auto_save_interval(&mut self, seconds: u64)
pub fn set_auto_save_interval(&mut self, seconds: u64)
Set auto-save interval in seconds
Sourcepub fn set_persistence_enabled(&mut self, enabled: bool)
pub fn set_persistence_enabled(&mut self, enabled: bool)
Enable or disable persistence
Sourcepub async fn save_vertex_after_consensus(&self, vertex: &Vertex) -> Result<()>
pub async fn save_vertex_after_consensus(&self, vertex: &Vertex) -> Result<()>
Save a DAG vertex after consensus
Sourcepub async fn persist_peer_info(
&self,
peer_id: &PeerId,
info: &PeerInfo,
) -> Result<()>
pub async fn persist_peer_info( &self, peer_id: &PeerId, info: &PeerInfo, ) -> Result<()>
Persist peer information
Sourcepub async fn store_dark_domain_registration(
&self,
record: &DarkDomainRecord,
) -> Result<()>
pub async fn store_dark_domain_registration( &self, record: &DarkDomainRecord, ) -> Result<()>
Store dark domain registration
Sourcepub async fn load_state_on_startup(&self) -> Result<StartupState>
pub async fn load_state_on_startup(&self) -> Result<StartupState>
Load state on startup
Sourcepub async fn start_auto_save_task(&self) -> Result<()>
pub async fn start_auto_save_task(&self) -> Result<()>
Start auto-save background task
Sourcepub async fn get_storage_stats(&self) -> Result<StorageStats>
pub async fn get_storage_stats(&self) -> Result<StorageStats>
Get storage statistics
Auto Trait Implementations§
impl<S> Freeze for PersistentNodeRunner<S>
impl<S> RefUnwindSafe for PersistentNodeRunner<S>where
S: RefUnwindSafe,
impl<S> Send for PersistentNodeRunner<S>
impl<S> Sync for PersistentNodeRunner<S>
impl<S> Unpin for PersistentNodeRunner<S>
impl<S> UnwindSafe for PersistentNodeRunner<S>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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