[][src]Struct grin_chain::types::SyncState

pub struct SyncState { /* fields omitted */ }

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,