Struct linera_chain::data_types::HashedValue
source · pub struct HashedValue { /* private fields */ }
Expand description
A statement to be certified by the validators, with its hash.
Implementations§
source§impl HashedValue
impl HashedValue
sourcepub fn new_confirmed(executed_block: ExecutedBlock) -> HashedValue
pub fn new_confirmed(executed_block: ExecutedBlock) -> HashedValue
Creates a ConfirmedBlock
value.
sourcepub fn new_validated(executed_block: ExecutedBlock) -> HashedValue
pub fn new_validated(executed_block: ExecutedBlock) -> HashedValue
Creates a new ValidatedBlock
value.
sourcepub fn new_leader_timeout(
chain_id: ChainId,
height: BlockHeight,
epoch: Epoch
) -> HashedValue
pub fn new_leader_timeout( chain_id: ChainId, height: BlockHeight, epoch: Epoch ) -> HashedValue
Creates a new LeaderTimeout
value.
pub fn hash(&self) -> CryptoHash
pub fn lite(&self) -> LiteValue
sourcepub fn validated_to_confirmed(&self) -> Option<HashedValue>
pub fn validated_to_confirmed(&self) -> Option<HashedValue>
Returns the corresponding ConfirmedBlock
, if this is a ValidatedBlock
.
pub fn inner(&self) -> &CertificateValue
pub fn into_inner(self) -> CertificateValue
Trait Implementations§
source§impl Clone for HashedValue
impl Clone for HashedValue
source§fn clone(&self) -> HashedValue
fn clone(&self) -> HashedValue
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 ContainerType for HashedValue
impl ContainerType for HashedValue
source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
Resolves a field value and outputs it as a json value
async_graphql::Value
. Read moresource§async fn find_entity(
&self,
ctx: &Context<'_>,
params: &Value
) -> ServerResult<Option<Value>>
async fn find_entity( &self, ctx: &Context<'_>, params: &Value ) -> ServerResult<Option<Value>>
Find the GraphQL entity with the given name from the parameter. Read more
source§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a> ) -> Result<(), ServerError>
Collect all the fields of the container that are queried in the
selection set. Read more
source§impl Debug for HashedValue
impl Debug for HashedValue
source§impl<'a> Deserialize<'a> for HashedValue
impl<'a> Deserialize<'a> for HashedValue
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<CertificateValue> for HashedValue
impl From<CertificateValue> for HashedValue
source§fn from(value: CertificateValue) -> HashedValue
fn from(value: CertificateValue) -> HashedValue
Converts to this type from the input type.
source§impl From<HashedValue> for CertificateValue
impl From<HashedValue> for CertificateValue
source§fn from(hv: HashedValue) -> CertificateValue
fn from(hv: HashedValue) -> CertificateValue
Converts to this type from the input type.
source§impl Hash for HashedValue
impl Hash for HashedValue
source§impl OutputType for HashedValue
impl OutputType for HashedValue
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field> ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value
.source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl PartialEq for HashedValue
impl PartialEq for HashedValue
source§fn eq(&self, other: &HashedValue) -> bool
fn eq(&self, other: &HashedValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for HashedValue
impl Serialize for HashedValue
impl Eq for HashedValue
impl ObjectType for HashedValue
impl StructuralPartialEq for HashedValue
Auto Trait Implementations§
impl Freeze for HashedValue
impl RefUnwindSafe for HashedValue
impl Send for HashedValue
impl Sync for HashedValue
impl Unpin for HashedValue
impl UnwindSafe for HashedValue
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.