Struct stack_test_epic_chain::types::SyncState
source · [−]pub struct SyncState { /* private fields */ }
Expand description
Current sync state. Encapsulates the current SyncStatus.
Implementations
sourceimpl SyncState
impl SyncState
sourcepub fn is_syncing(&self) -> bool
pub fn is_syncing(&self) -> bool
Whether the current state matches any active syncing operation. Note: This includes our “initial” state.
sourcepub fn status(&self) -> SyncStatus
pub fn status(&self) -> SyncStatus
Current syncing status
sourcepub fn update(&self, new_status: SyncStatus)
pub fn update(&self, new_status: SyncStatus)
Update the syncing status
sourcepub fn update_txhashset_download(&self, new_status: SyncStatus) -> bool
pub fn update_txhashset_download(&self, new_status: SyncStatus) -> bool
Update txhashset downloading progress
sourcepub fn set_sync_error(&self, error: Error)
pub fn set_sync_error(&self, error: Error)
Communicate sync error
sourcepub fn sync_error(&self) -> Arc<RwLock<Option<Error>>>
pub fn sync_error(&self) -> Arc<RwLock<Option<Error>>>
Get sync error
sourcepub fn clear_sync_error(&self)
pub fn clear_sync_error(&self)
Clear sync error
Trait Implementations
sourceimpl TxHashsetWriteStatus for SyncState
impl TxHashsetWriteStatus for SyncState
sourcefn on_validation_kernels(&self, kernels: u64, kernels_total: u64)
fn on_validation_kernels(&self, kernels: u64, kernels_total: u64)
Starting kernel validation
sourcefn on_validation_rproofs(&self, rproofs: u64, rproofs_total: u64)
fn on_validation_rproofs(&self, rproofs: u64, rproofs_total: u64)
Starting rproof validation
Auto Trait Implementations
impl !RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl !UnwindSafe for SyncState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more