pub struct SyncState { /* private fields */ }
Expand description
Current sync state. Encapsulates the current SyncStatus.
Implementations§
Source§impl 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 clear_sync_error(&self)
pub fn clear_sync_error(&self)
Clear sync error
Trait Implementations§
Source§impl TxHashsetWriteStatus for SyncState
impl TxHashsetWriteStatus for SyncState
Source§fn on_validation_kernels(&self, kernels: u64, kernels_total: u64)
fn on_validation_kernels(&self, kernels: u64, kernels_total: u64)
Starting kernel validation
Source§fn 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 !Freeze for SyncState
impl !RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl !UnwindSafe for SyncState
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