Struct chain_impl_mockchain::fragment::Contents
source · pub struct Contents(pub(super) Box<[Fragment]>);
Expand description
Block Contents
To create this structure, make a ContentsBuilder and use into()
Tuple Fields§
§0: Box<[Fragment]>
Implementations§
source§impl Contents
impl Contents
pub fn empty() -> Self
pub fn iter(&self) -> impl Iterator<Item = &Fragment>
pub fn iter_slice(&self) -> Iter<'_, Fragment>
pub fn compute_hash_size(&self) -> (BlockContentHash, BlockContentSize)
pub fn compute_hash(&self) -> BlockContentHash
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
source§impl From<ContentsBuilder> for Contents
impl From<ContentsBuilder> for Contents
source§fn from(content_builder: ContentsBuilder) -> Self
fn from(content_builder: ContentsBuilder) -> Self
Converts to this type from the input type.
impl Eq for Contents
Auto Trait Implementations§
impl RefUnwindSafe for Contents
impl Send for Contents
impl Sync for Contents
impl Unpin for Contents
impl UnwindSafe for Contents
Blanket Implementations§
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