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

pub struct SyncState { /* fields omitted */ }

Current sync state. Encapsulates the current SyncStatus.


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)[src]

Update the syncing status

pub fn update_txhashset_download(&self, new_status: SyncStatus) -> bool[src]

Update txhashset downloading progress

pub fn set_sync_error(&self, error: Error)[src]

Communicate sync error

pub fn sync_error(&self) -> Arc<RwLock<Option<Error>>>[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, U> Into<U> for T where
    U: From<T>, 

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

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

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

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

impl<T> UnsafeAny for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

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

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