Struct snarkvm_objects::block::Block [−][src]
pub struct Block<T: Transaction> { pub header: BlockHeader, pub transactions: DPCTransactions<T>, }
Fields
header: BlockHeaderFirst HEADER_SIZE bytes of the block as defined by the encoding used by
“block” messages.
transactions: DPCTransactions<T>The block transactions.
Implementations
impl<T: Transaction> Block<T>[src]
impl<T: Transaction> Block<T>[src]pub fn serialize(&self) -> Result<Vec<u8>, BlockError>[src]
pub fn deserialize(bytes: &[u8]) -> Result<Self, BlockError>[src]
Trait Implementations
impl<T: Transaction> BlockScheme for Block<T>[src]
impl<T: Transaction> BlockScheme for Block<T>[src]fn header(&self) -> &Self::BlockHeader[src]
fn header(&self) -> &Self::BlockHeader[src]Returns the header.
fn transactions(&self) -> &[Self::Transaction]ⓘ[src]
fn transactions(&self) -> &[Self::Transaction]ⓘ[src]Returns the transactions.
impl<T: Clone + Transaction> Clone for Block<T>[src]
impl<T: Clone + Transaction> Clone for Block<T>[src]impl<T: Debug + Transaction> Debug for Block<T>[src]
impl<T: Debug + Transaction> Debug for Block<T>[src]impl<T: Transaction> FromBytes for Block<T>[src]
impl<T: Transaction> FromBytes for Block<T>[src]impl<T: Transaction> ToBytes for Block<T>[src]
impl<T: Transaction> ToBytes for Block<T>[src]impl<T: Eq + Transaction> Eq for Block<T>[src]
impl<T: Transaction> StructuralEq for Block<T>[src]
impl<T: Transaction> StructuralPartialEq for Block<T>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Block<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Block<T> where
T: Send,
T: Send,
impl<T> Sync for Block<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Block<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Block<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
pub fn equivalent(&self, key: &K) -> bool[src]Compare self to key and return true if they are equal.
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,