pub type FlatBlocks = Blocks<FlatBlock>;

Aliased Type§

struct FlatBlocks(/* private fields */);

Implementations§

source§

impl<T: Default> Blocks<T>

source

pub fn new_errored(_diag_added: DiagnosticAdded) -> Self

source

pub fn get(&self) -> &Vec<T>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn iter(&self) -> BlocksIter<'_, T>

source

pub fn root_block(&self) -> Maybe<&T>

source

pub fn has_root(&self) -> Maybe<()>

source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

source

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

source

pub fn reset_block(&mut self, block_id: BlockId, block: T)

Trait Implementations§

source§

impl<T: Clone> Clone for Blocks<T>

source§

fn clone(&self) -> Blocks<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 Blocks<T>

source§

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

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

impl<T> Index<BlockId> for Blocks<T>

§

type Output = T

The returned type after indexing.
source§

fn index(&self, index: BlockId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<BlockId> for Blocks<T>

source§

fn index_mut(&mut self, index: BlockId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<T: PartialEq> PartialEq<Blocks<T>> for Blocks<T>

source§

fn eq(&self, other: &Blocks<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 Blocks<T>

source§

impl<T> StructuralEq for Blocks<T>

source§

impl<T> StructuralPartialEq for Blocks<T>