Skip to main content

WritableBodyTransaction

Trait WritableBodyTransaction 

Source
pub trait WritableBodyTransaction {
    // Required method
    fn write_into(
        &self,
        buffer: &mut OwnedAlignedBuffer,
    ) -> Result<(), OwnedLeafShardBodyError>;
}
ⓘ This trait cannot be implemented outside ab_core_primitives.
Expand description

Transaction that can be written into the body.

Can’t be implemented outside of this module, because block body builders rely on it appending exactly one correctly encoded transaction to the buffer or leaving it unchanged.

Required Methods§

Source

fn write_into( &self, buffer: &mut OwnedAlignedBuffer, ) -> Result<(), OwnedLeafShardBodyError>

Write this transaction into the body.

Returns OwnedLeafShardBodyError::BlockBodyIsTooLarge and leaves the buffer unchanged if the body becomes too large.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§