Skip to main content

Verifiable

Trait Verifiable 

Source
pub trait Verifiable<T: NodeType>:
    HasViewNumber
    + HasEpoch
    + Sized {
    type Key: Copy + Ord + Hash + Display + Send + Sync + 'static;
    type Output: Send + 'static;

    // Required methods
    fn key(&self) -> Option<Self::Key>;
    fn check(
        self,
        stake_table: &[<T::SignatureKey as SignatureKey>::StakeTableEntry],
        threshold: U256,
        upgrade_lock: &UpgradeLock<T>,
    ) -> Result<Self::Output>;
}

Required Associated Types§

Source

type Key: Copy + Ord + Hash + Display + Send + Sync + 'static

Identifies the Verifiable, e.g. ViewNumber or EpochNumber.

Source

type Output: Send + 'static

Required Methods§

Source

fn key(&self) -> Option<Self::Key>

Source

fn check( self, stake_table: &[<T::SignatureKey as SignatureKey>::StakeTableEntry], threshold: U256, upgrade_lock: &UpgradeLock<T>, ) -> Result<Self::Output>

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.

Implementations on Foreign Types§

Source§

impl<T, D, V> Verifiable<T> for SimpleCertificate<T, D, V>
where T: NodeType, D: Voteable<T> + HasEpoch + 'static, V: Threshold<T>, Self: Certificate<T, D> + Send + 'static,

Source§

type Key = ViewNumber

Source§

type Output = SimpleCertificate<T, D, V>

Source§

fn key(&self) -> Option<ViewNumber>

Source§

fn check( self, stake_table: &[<T::SignatureKey as SignatureKey>::StakeTableEntry], threshold: U256, upgrade_lock: &UpgradeLock<T>, ) -> Result<Self>

Implementors§