pub enum ClusterBlock {
Simple(SimpleBlock),
Group(BlockGroup),
}Expand description
A block in a Cluster, either a SimpleBlock or a BlockGroup.
This is a convenience enum to allow handling both types of blocks uniformly.
- when reading: often we just want to iterate over all blocks in a cluster, regardless of type.
- when writing: we may want to write a list of blocks of mixed types.
Variants§
Trait Implementations§
Source§impl Clone for ClusterBlock
impl Clone for ClusterBlock
Source§fn clone(&self) -> ClusterBlock
fn clone(&self) -> ClusterBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClusterBlock
impl Debug for ClusterBlock
Source§impl From<BlockGroup> for ClusterBlock
impl From<BlockGroup> for ClusterBlock
Source§fn from(b: BlockGroup) -> Self
fn from(b: BlockGroup) -> Self
Converts to this type from the input type.
Source§impl From<SimpleBlock> for ClusterBlock
impl From<SimpleBlock> for ClusterBlock
Source§fn from(b: SimpleBlock) -> Self
fn from(b: SimpleBlock) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ClusterBlock
impl PartialEq for ClusterBlock
impl Eq for ClusterBlock
impl StructuralPartialEq for ClusterBlock
Auto Trait Implementations§
impl Freeze for ClusterBlock
impl RefUnwindSafe for ClusterBlock
impl Send for ClusterBlock
impl Sync for ClusterBlock
impl Unpin for ClusterBlock
impl UnwindSafe for ClusterBlock
Blanket Implementations§
Source§impl<T> AsyncWriteTo for Twhere
T: Encode,
impl<T> AsyncWriteTo for Twhere
T: Encode,
Source§async fn async_write_to<W>(&self, w: &mut W) -> Result<(), Error>where
W: AsyncWrite + Unpin,
async fn async_write_to<W>(&self, w: &mut W) -> Result<(), Error>where
W: AsyncWrite + Unpin,
Available on crate feature
tokio only.Write to a writer asynchronously.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more