pub type FlatBlocksBuilder = BlocksBuilder<FlatBlock>;

Aliased Type§

struct FlatBlocksBuilder(pub Vec<FlatBlock, Global>);

Fields§

§0: Vec<FlatBlock, Global>

Implementations§

source§

impl<T: Default> BlocksBuilder<T>

source

pub fn new() -> Self

source

pub fn alloc(&mut self, block: T) -> BlockId

source

pub fn alloc_empty(&mut self) -> BlockId

Allocate a new block ID. The block itself should be populated later.

source

pub fn set_block(&mut self, id: BlockId, block: T)

Sets an already-allocated block.

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn build(self) -> Option<Blocks<T>>

Trait Implementations§

source§

impl<T: Clone> Clone for BlocksBuilder<T>

source§

fn clone(&self) -> BlocksBuilder<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for BlocksBuilder<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for BlocksBuilder<T>

source§

fn default() -> BlocksBuilder<T>

Returns the “default value” for a type. Read more
source§

impl<T: PartialEq> PartialEq<BlocksBuilder<T>> for BlocksBuilder<T>

source§

fn eq(&self, other: &BlocksBuilder<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Eq> Eq for BlocksBuilder<T>

source§

impl<T> StructuralEq for BlocksBuilder<T>

source§

impl<T> StructuralPartialEq for BlocksBuilder<T>