[−][src]Struct grin_chain::types::SyncState
Current sync state. Encapsulates the current SyncStatus.
Implementations
impl SyncState
[src]
pub fn new() -> SyncState
[src]
Return a new SyncState initialize to NoSync
pub fn is_syncing(&self) -> bool
[src]
Whether the current state matches any active syncing operation. Note: This includes our "initial" state.
pub fn status(&self) -> SyncStatus
[src]
Current syncing status
pub fn update(&self, new_status: SyncStatus) -> bool
[src]
Update the syncing status
pub fn update_if<F>(&self, new_status: SyncStatus, f: F) -> bool where
F: Fn(SyncStatus) -> bool,
[src]
F: Fn(SyncStatus) -> bool,
Update the syncing status if predicate f is satisfied
pub fn update_txhashset_download(&self, stats: TxHashsetDownloadStats)
[src]
Update txhashset downloading progress
pub fn set_sync_error(&self, error: Error)
[src]
Communicate sync error
pub fn sync_error(&self) -> Option<String>
[src]
Get sync error
pub fn clear_sync_error(&self)
[src]
Clear sync error
Trait Implementations
impl TxHashsetWriteStatus for SyncState
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,