Struct ckb_types::core::HeaderBuilder
source · pub struct HeaderBuilder { /* private fields */ }
Expand description
An advanced builder for HeaderView
.
Base on packed::HeaderBuilder
but added lots of syntactic sugar.
Implementations§
source§impl HeaderBuilder
impl HeaderBuilder
sourcepub fn parent_hash(self, v: Byte32) -> Self
pub fn parent_hash(self, v: Byte32) -> Self
Sets parent_hash
.
sourcepub fn transactions_root(self, v: Byte32) -> Self
pub fn transactions_root(self, v: Byte32) -> Self
Sets transactions_root
.
sourcepub fn proposals_hash(self, v: Byte32) -> Self
pub fn proposals_hash(self, v: Byte32) -> Self
Sets proposals_hash
.
sourcepub fn compact_target(self, v: Uint32) -> Self
pub fn compact_target(self, v: Uint32) -> Self
Sets compact_target
.
sourcepub fn extra_hash(self, v: Byte32) -> Self
pub fn extra_hash(self, v: Byte32) -> Self
Sets extra_hash
.
sourcepub fn build(self) -> HeaderView
pub fn build(self) -> HeaderView
Converts into HeaderView
.
Trait Implementations§
source§impl Clone for HeaderBuilder
impl Clone for HeaderBuilder
source§fn clone(&self) -> HeaderBuilder
fn clone(&self) -> HeaderBuilder
Returns a copy 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 HeaderBuilder
impl Debug for HeaderBuilder
Auto Trait Implementations§
impl RefUnwindSafe for HeaderBuilder
impl Send for HeaderBuilder
impl Sync for HeaderBuilder
impl Unpin for HeaderBuilder
impl UnwindSafe for HeaderBuilder
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