pub struct HashedCertificateValue { /* private fields */ }
Expand description
A statement to be certified by the validators, with its hash.
Implementations§
Source§impl HashedCertificateValue
impl HashedCertificateValue
Sourcepub fn new_confirmed(executed_block: ExecutedBlock) -> HashedCertificateValue
pub fn new_confirmed(executed_block: ExecutedBlock) -> HashedCertificateValue
Creates a ConfirmedBlock
value.
Sourcepub fn new_validated(executed_block: ExecutedBlock) -> HashedCertificateValue
pub fn new_validated(executed_block: ExecutedBlock) -> HashedCertificateValue
Creates a ValidatedBlock
value.
Sourcepub fn new_timeout(
chain_id: ChainId,
height: BlockHeight,
epoch: Epoch,
) -> HashedCertificateValue
pub fn new_timeout( chain_id: ChainId, height: BlockHeight, epoch: Epoch, ) -> HashedCertificateValue
Creates a Timeout
value.
pub fn hash(&self) -> CryptoHash
pub fn lite(&self) -> LiteValue
Sourcepub fn validated_to_confirmed(&self) -> Option<HashedCertificateValue>
pub fn validated_to_confirmed(&self) -> Option<HashedCertificateValue>
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 HashedCertificateValue
impl Clone for HashedCertificateValue
Source§fn clone(&self) -> HashedCertificateValue
fn clone(&self) -> HashedCertificateValue
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 HashedCertificateValue
impl ContainerType for HashedCertificateValue
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 HashedCertificateValue
impl Debug for HashedCertificateValue
Source§impl<'a> Deserialize<'a> for HashedCertificateValue
impl<'a> Deserialize<'a> for HashedCertificateValue
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 HashedCertificateValue
impl From<CertificateValue> for HashedCertificateValue
Source§fn from(value: CertificateValue) -> HashedCertificateValue
fn from(value: CertificateValue) -> HashedCertificateValue
Converts to this type from the input type.
Source§impl From<HashedCertificateValue> for CertificateValue
impl From<HashedCertificateValue> for CertificateValue
Source§fn from(hv: HashedCertificateValue) -> CertificateValue
fn from(hv: HashedCertificateValue) -> CertificateValue
Converts to this type from the input type.
Source§impl Hash for HashedCertificateValue
impl Hash for HashedCertificateValue
Source§impl OutputType for HashedCertificateValue
impl OutputType for HashedCertificateValue
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 HashedCertificateValue
impl PartialEq for HashedCertificateValue
Source§impl Serialize for HashedCertificateValue
impl Serialize for HashedCertificateValue
impl Eq for HashedCertificateValue
impl ObjectType for HashedCertificateValue
impl StructuralPartialEq for HashedCertificateValue
Auto Trait Implementations§
impl Freeze for HashedCertificateValue
impl RefUnwindSafe for HashedCertificateValue
impl Send for HashedCertificateValue
impl Sync for HashedCertificateValue
impl Unpin for HashedCertificateValue
impl UnwindSafe for HashedCertificateValue
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.