pub enum BlockStatus {
StatusInvalid,
StatusUTXOValid,
StatusUTXOPendingVerification,
StatusDisqualifiedFromChain,
StatusHeaderOnly,
}Variants§
StatusInvalid
StatusInvalid indicates that the block is invalid.
StatusUTXOValid
StatusUTXOValid indicates the block is valid from any UTXO related aspects and has passed all the other validations as well.
StatusUTXOPendingVerification
StatusUTXOPendingVerification indicates that the block is pending verification against its past UTXO-Set, either because it was not yet verified since the block was never in the selected parent chain, or if the block violates finality.
StatusDisqualifiedFromChain
StatusDisqualifiedFromChain indicates that the block is not eligible to be a selected parent.
StatusHeaderOnly
StatusHeaderOnly indicates that the block transactions are not held (pruned or wasn’t added yet)
Implementations§
Source§impl BlockStatus
impl BlockStatus
pub fn has_block_header(self) -> bool
pub fn is_header_only(self) -> bool
pub fn has_block_body(self) -> bool
pub fn is_utxo_valid_or_pending(self) -> bool
pub fn is_valid(self) -> bool
pub fn is_invalid(self) -> bool
Trait Implementations§
Source§impl Clone for BlockStatus
impl Clone for BlockStatus
Source§fn clone(&self) -> BlockStatus
fn clone(&self) -> BlockStatus
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockStatus
impl Debug for BlockStatus
Source§impl<'de> Deserialize<'de> for BlockStatus
impl<'de> Deserialize<'de> for BlockStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MemSizeEstimator for BlockStatus
impl MemSizeEstimator for BlockStatus
Source§fn estimate_size(&self, mem_mode: MemMode) -> usize
fn estimate_size(&self, mem_mode: MemMode) -> usize
Estimates the size of this object depending on the passed mem mode
Source§fn estimate_mem_bytes(&self) -> usize
fn estimate_mem_bytes(&self) -> usize
Estimates the (deep) size of this object in bytes (including heap owned inner data)
Source§fn estimate_mem_units(&self) -> usize
fn estimate_mem_units(&self) -> usize
Estimates the number of units this object holds in memory where the unit byte size is usually
a constant known to the caller as well (and hence we avoid computing it over and over)
Source§impl PartialEq for BlockStatus
impl PartialEq for BlockStatus
Source§impl Serialize for BlockStatus
impl Serialize for BlockStatus
impl Copy for BlockStatus
impl Eq for BlockStatus
impl StructuralPartialEq for BlockStatus
Auto Trait Implementations§
impl Freeze for BlockStatus
impl RefUnwindSafe for BlockStatus
impl Send for BlockStatus
impl Sync for BlockStatus
impl Unpin for BlockStatus
impl UnwindSafe for BlockStatus
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more