pub struct RpcRawHeader {
pub version: u16,
pub parents_by_level: Vec<Vec<Hash>>,
pub hash_merkle_root: Hash,
pub accepted_id_merkle_root: Hash,
pub utxo_commitment: Hash,
pub timestamp: u64,
pub bits: u32,
pub nonce: u64,
pub daa_score: u64,
pub blue_work: Uint192,
pub blue_score: u64,
pub pruning_point: Hash,
}Expand description
Raw Rpc header type - without a cached header hash. Used for mining APIs (get_block_template & submit_block)
Fields§
§version: u16§parents_by_level: Vec<Vec<Hash>>§hash_merkle_root: Hash§accepted_id_merkle_root: Hash§utxo_commitment: Hash§timestamp: u64Timestamp is in milliseconds
bits: u32§nonce: u64§daa_score: u64§blue_work: Uint192§blue_score: u64§pruning_point: HashTrait Implementations§
Source§impl BorshDeserialize for RpcRawHeader
impl BorshDeserialize for RpcRawHeader
fn deserialize_reader<__R>(reader: &mut __R) -> Result<RpcRawHeader, Error>where
__R: Read,
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for RpcRawHeader
impl BorshSerialize for RpcRawHeader
Source§impl Clone for RpcRawHeader
impl Clone for RpcRawHeader
Source§fn clone(&self) -> RpcRawHeader
fn clone(&self) -> RpcRawHeader
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 RpcRawHeader
impl Debug for RpcRawHeader
Source§impl<'de> Deserialize<'de> for RpcRawHeader
impl<'de> Deserialize<'de> for RpcRawHeader
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RpcRawHeader, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RpcRawHeader, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Deserializer for RpcRawHeader
impl Deserializer for RpcRawHeader
fn deserialize<R>(reader: &mut R) -> Result<RpcRawHeader, Error>where
R: Read,
fn try_from_slice(slice: &[u8]) -> Result<Self, Error>
Source§impl From<&Header> for RpcRawHeader
impl From<&Header> for RpcRawHeader
Source§fn from(header: &Header) -> RpcRawHeader
fn from(header: &Header) -> RpcRawHeader
Converts to this type from the input type.
Source§impl From<Header> for RpcRawHeader
impl From<Header> for RpcRawHeader
Source§fn from(header: Header) -> RpcRawHeader
fn from(header: Header) -> RpcRawHeader
Converts to this type from the input type.
Source§impl Serialize for RpcRawHeader
impl Serialize for RpcRawHeader
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RpcRawHeader
impl RefUnwindSafe for RpcRawHeader
impl Send for RpcRawHeader
impl Sync for RpcRawHeader
impl Unpin for RpcRawHeader
impl UnwindSafe for RpcRawHeader
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
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more