Skip to main content

GenericOwnedBlockBody

Trait GenericOwnedBlockBody 

Source
pub trait GenericOwnedBlockBody:
    Clone
    + Debug
    + Send
    + Sync
    + Into<OwnedBlockBody>
    + 'static {
    type Body<'a>: GenericBlockBody<'a>
       where Self: 'a;

    const SHARD_KIND: RealShardKind;

    // Required methods
    fn from_buffer(
        buffer: SharedAlignedBuffer,
    ) -> Result<Self, SharedAlignedBuffer>;
    fn buffer(&self) -> &SharedAlignedBuffer;
    fn ref_count(&self) -> usize;
    fn body(&self) -> &Self::Body<'_>;
}
Expand description

Generic owned block body

Required Associated Constants§

Required Associated Types§

Source

type Body<'a>: GenericBlockBody<'a> where Self: 'a

Block body

Required Methods§

Source

fn from_buffer(buffer: SharedAlignedBuffer) -> Result<Self, SharedAlignedBuffer>

Create an owned body from a buffer

Source

fn buffer(&self) -> &SharedAlignedBuffer

Inner buffer with block body contents

Source

fn ref_count(&self) -> usize

Number of clones in memory

Source

fn body(&self) -> &Self::Body<'_>

Get a regular block body out of the owned version

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§