pub trait ProcessableCertificate:
CertificateValue
+ Sized
+ 'static
+ Send {
type Certificate: Certified<Value = Self> + Clone + Send + Sync + 'static;
// Required methods
fn make_certificate(
quorum: GenericCertificate<Self>,
justification: JustificationChain,
) -> Self::Certificate;
fn process_certificate<S: Storage + Clone + 'static>(
worker: &WorkerState<S>,
certificate: Self::Certificate,
) -> impl Future<Output = Result<(ChainInfoResponse, NetworkActions), WorkerError>> + Send;
}Expand description
A certificate value that the worker knows how to process.
Required Associated Types§
Required Methods§
Sourcefn make_certificate(
quorum: GenericCertificate<Self>,
justification: JustificationChain,
) -> Self::Certificate
fn make_certificate( quorum: GenericCertificate<Self>, justification: JustificationChain, ) -> Self::Certificate
Builds the concrete certificate from a signed quorum and a justification chain. The chain
is ignored for values (such as Timeout) that carry no justification.
Sourcefn process_certificate<S: Storage + Clone + 'static>(
worker: &WorkerState<S>,
certificate: Self::Certificate,
) -> impl Future<Output = Result<(ChainInfoResponse, NetworkActions), WorkerError>> + Send
fn process_certificate<S: Storage + Clone + 'static>( worker: &WorkerState<S>, certificate: Self::Certificate, ) -> impl Future<Output = Result<(ChainInfoResponse, NetworkActions), WorkerError>> + Send
Processes a certificate carrying this value on the given worker.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.