Struct disarray_ledger::blocks::Block
source · pub struct Block {
pub content: BlockContent,
pub header: BlockHeader,
pub block_type: BlockType,
pub selfish_block: bool,
}
Fields
content: BlockContent
header: BlockHeader
block_type: BlockType
selfish_block: bool
Implementations
sourceimpl Block
impl Block
pub fn new(
content: BlockContent,
header: BlockHeader,
block_type: BlockType,
selfish_block: bool
) -> Self
Trait Implementations
sourceimpl CoreBlockSpec for Block
impl CoreBlockSpec for Block
fn content(&self) -> &BlockContent
fn header(&self) -> &BlockHeader
fn nonce(&self) -> BlockNc
fn parent(&self) -> BlockHs
fn timestamp(&self) -> BlockTs
fn transactions(&self) -> &Vec<SignedTransaction>ⓘ
sourceimpl CoreBlockWrapper for Block
impl CoreBlockWrapper for Block
fn clear_txns(&mut self) -> &Self
fn print_txns(&self) -> &Self
sourceimpl CoreBlockWrapperExt for Block
impl CoreBlockWrapperExt for Block
sourceimpl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
sourcefn 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
impl Eq for Block
impl StructuralEq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.