Enum linera_chain::data_types::CertificateValue
source · pub enum CertificateValue {
ValidatedBlock {
executed_block: ExecutedBlock,
},
ConfirmedBlock {
executed_block: ExecutedBlock,
},
LeaderTimeout {
chain_id: ChainId,
height: BlockHeight,
epoch: Epoch,
},
}
Expand description
A statement to be certified by the validators.
Variants§
ValidatedBlock
Fields
§
executed_block: ExecutedBlock
ConfirmedBlock
Fields
§
executed_block: ExecutedBlock
LeaderTimeout
Implementations§
source§impl CertificateValue
impl CertificateValue
pub fn chain_id(&self) -> ChainId
pub fn height(&self) -> BlockHeight
pub fn epoch(&self) -> Epoch
sourcepub fn with_hash_unchecked(self, hash: CryptoHash) -> HashedValue
pub fn with_hash_unchecked(self, hash: CryptoHash) -> HashedValue
Creates a HashedValue
without checking that this is the correct hash!
sourcepub fn has_message(&self, message_id: &MessageId) -> bool
pub fn has_message(&self, message_id: &MessageId) -> bool
Returns whether this value contains the message with the specified ID.
pub fn is_confirmed(&self) -> bool
pub fn is_validated(&self) -> bool
pub fn is_timeout(&self) -> bool
pub fn executed_block(&self) -> Option<&ExecutedBlock>
pub fn block(&self) -> Option<&Block>
pub fn to_log_str(&self) -> &'static str
Trait Implementations§
source§impl Clone for CertificateValue
impl Clone for CertificateValue
source§fn clone(&self) -> CertificateValue
fn clone(&self) -> CertificateValue
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 CertificateValue
impl ContainerType for CertificateValue
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 CertificateValue
impl Debug for CertificateValue
source§impl<'de> Deserialize<'de> for CertificateValue
impl<'de> Deserialize<'de> for CertificateValue
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 CertificateValue
impl Hash for CertificateValue
source§impl OutputType for CertificateValue
impl OutputType for CertificateValue
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 CertificateValue
impl PartialEq for CertificateValue
source§fn eq(&self, other: &CertificateValue) -> bool
fn eq(&self, other: &CertificateValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CertificateValue
impl Serialize for CertificateValue
impl BcsHashable for CertificateValue
impl Eq for CertificateValue
impl ObjectType for CertificateValue
impl StructuralPartialEq for CertificateValue
Auto Trait Implementations§
impl Freeze for CertificateValue
impl RefUnwindSafe for CertificateValue
impl Send for CertificateValue
impl Sync for CertificateValue
impl Unpin for CertificateValue
impl UnwindSafe for CertificateValue
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.source§impl<T> HasTypeName for Twhere
T: BcsHashable,
impl<T> HasTypeName for Twhere
T: BcsHashable,
source§impl<T, Hasher> Hashable<Hasher> for Twhere
T: BcsHashable,
Hasher: Write,
impl<T, Hasher> Hashable<Hasher> for Twhere
T: BcsHashable,
Hasher: Write,
source§fn write(&self, hasher: &mut Hasher)
fn write(&self, hasher: &mut Hasher)
Send the content of
Self
to the given hasher.