pub trait Block: Decidable + Initializer + StatusWriter + Sync + Send {
// Required methods
fn bytes<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = &[u8]> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn to_bytes<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn timestamp<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn parent<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Id> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn verify<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
ref.https://pkg.go.dev/github.com/ava-labs/avalanchego/snow/consensus/snowman#Block
Required Methods§
sourcefn bytes<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = &[u8]> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bytes<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = &[u8]> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the bytes of this block.
sourcefn to_bytes<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn to_bytes<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns bytes from serde.
sourcefn height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn height<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the height of the block in the chain.
sourcefn timestamp<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn timestamp<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the creation timestamp of the block in the chain.