Struct cardano_serialization_lib::HeaderBody
source · [−]pub struct HeaderBody { /* private fields */ }
Implementations
sourceimpl HeaderBody
impl HeaderBody
pub fn from_bytes(bytes: Vec<u8>) -> Result<HeaderBody, DeserializeError>
sourceimpl HeaderBody
impl HeaderBody
pub fn block_number(&self) -> u32
sourcepub fn slot(&self) -> Result<u32, JsError>
👎 Deprecated since 10.1.0: Possible boundary error. Use slot_bignum instead
pub fn slot(&self) -> Result<u32, JsError>
Possible boundary error. Use slot_bignum instead
!!! DEPRECATED !!! Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits. Otherwise will just raise an error.
pub fn slot_bignum(&self) -> BigNum
pub fn prev_hash(&self) -> Option<BlockHash>
pub fn issuer_vkey(&self) -> Vkey
pub fn vrf_vkey(&self) -> VRFVKey
pub fn nonce_vrf(&self) -> VRFCert
pub fn leader_vrf(&self) -> VRFCert
pub fn block_body_size(&self) -> u32
pub fn block_body_hash(&self) -> BlockHash
pub fn operational_cert(&self) -> OperationalCert
pub fn protocol_version(&self) -> ProtocolVersion
sourcepub fn new(
block_number: u32,
slot: u32,
prev_hash: Option<BlockHash>,
issuer_vkey: &Vkey,
vrf_vkey: &VRFVKey,
nonce_vrf: &VRFCert,
leader_vrf: &VRFCert,
block_body_size: u32,
block_body_hash: &BlockHash,
operational_cert: &OperationalCert,
protocol_version: &ProtocolVersion
) -> Self
👎 Deprecated since 10.1.0: Underlying value capacity of slot (BigNum u64) bigger then Slot32. Use new_bignum instead.
pub fn new(
block_number: u32,
slot: u32,
prev_hash: Option<BlockHash>,
issuer_vkey: &Vkey,
vrf_vkey: &VRFVKey,
nonce_vrf: &VRFCert,
leader_vrf: &VRFCert,
block_body_size: u32,
block_body_hash: &BlockHash,
operational_cert: &OperationalCert,
protocol_version: &ProtocolVersion
) -> Self
Underlying value capacity of slot (BigNum u64) bigger then Slot32. Use new_bignum instead.
!!! DEPRECATED !!!
This constructor uses outdated slot number format.
Use .new_headerbody
instead
pub fn new_headerbody(
block_number: u32,
slot: &BigNum,
prev_hash: Option<BlockHash>,
issuer_vkey: &Vkey,
vrf_vkey: &VRFVKey,
nonce_vrf: &VRFCert,
leader_vrf: &VRFCert,
block_body_size: u32,
block_body_hash: &BlockHash,
operational_cert: &OperationalCert,
protocol_version: &ProtocolVersion
) -> Self
Trait Implementations
sourceimpl Clone for HeaderBody
impl Clone for HeaderBody
sourcefn clone(&self) -> HeaderBody
fn clone(&self) -> HeaderBody
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Deserialize for HeaderBody
impl Deserialize for HeaderBody
fn deserialize<R: BufRead + Seek>(
raw: &mut Deserializer<R>
) -> Result<Self, DeserializeError>
sourceimpl DeserializeEmbeddedGroup for HeaderBody
impl DeserializeEmbeddedGroup for HeaderBody
fn deserialize_as_embedded_group<R: BufRead + Seek>(
raw: &mut Deserializer<R>,
len: Len
) -> Result<Self, DeserializeError>
sourceimpl Serialize for HeaderBody
impl Serialize for HeaderBody
fn serialize<'se, W: Write>(
&self,
serializer: &'se mut Serializer<W>
) -> Result<&'se mut Serializer<W>>
Auto Trait Implementations
impl RefUnwindSafe for HeaderBody
impl Send for HeaderBody
impl Sync for HeaderBody
impl Unpin for HeaderBody
impl UnwindSafe for HeaderBody
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more