Struct tc_finality_grandpa::AuthoritySet[][src]

pub struct AuthoritySet<H, N> { /* fields omitted */ }

A set of authorities.

Implementations

impl<H: Eq, N> AuthoritySet<H, N> where
    N: Add<Output = N> + Ord + Clone + Debug,
    H: Clone + Debug
[src]

pub fn enacts_standard_change<F, E>(
    &self,
    finalized_hash: H,
    finalized_number: N,
    is_descendent_of: &F
) -> Result<Option<bool>, Error<N, E>> where
    F: Fn(&H, &H) -> Result<bool, E>,
    E: Error
[src]

Check whether the given finalized block number enacts any standard authority set change (without triggering it), ensuring that if there are multiple changes in the same branch, finalizing this block won’t finalize past multiple transitions (i.e. transitions must be finalized in-order). Returns Some(true) if the block being finalized enacts a change that can be immediately applied, Some(false) if the block being finalized enacts a change but it cannot be applied yet since there are other dependent changes, and None if no change is enacted. The given function is_descendent_of should return true if the second hash (target) is a descendent of the first hash (base).

Trait Implementations

impl<H: Clone, N: Clone> Clone for AuthoritySet<H, N>[src]

impl<H: Debug, N: Debug> Debug for AuthoritySet<H, N>[src]

impl<H, N> Decode for AuthoritySet<H, N> where
    ForkTree<H, N, PendingChange<H, N>>: Decode,
    ForkTree<H, N, PendingChange<H, N>>: Decode,
    Vec<PendingChange<H, N>>: Decode,
    Vec<PendingChange<H, N>>: Decode,
    AuthoritySetChanges<N>: Decode,
    AuthoritySetChanges<N>: Decode
[src]

impl<H, N> Encode for AuthoritySet<H, N> where
    ForkTree<H, N, PendingChange<H, N>>: Encode,
    ForkTree<H, N, PendingChange<H, N>>: Encode,
    Vec<PendingChange<H, N>>: Encode,
    Vec<PendingChange<H, N>>: Encode,
    AuthoritySetChanges<N>: Encode,
    AuthoritySetChanges<N>: Encode
[src]

impl<H, N> EncodeLike<AuthoritySet<H, N>> for AuthoritySet<H, N> where
    ForkTree<H, N, PendingChange<H, N>>: Encode,
    ForkTree<H, N, PendingChange<H, N>>: Encode,
    Vec<PendingChange<H, N>>: Encode,
    Vec<PendingChange<H, N>>: Encode,
    AuthoritySetChanges<N>: Encode,
    AuthoritySetChanges<N>: Encode
[src]

impl<H, N> From<AuthoritySet<H, N>> for SharedAuthoritySet<H, N>[src]

impl<H: PartialEq, N: PartialEq> PartialEq<AuthoritySet<H, N>> for AuthoritySet<H, N>[src]

impl<H, N> StructuralPartialEq for AuthoritySet<H, N>[src]

Auto Trait Implementations

impl<H, N> RefUnwindSafe for AuthoritySet<H, N> where
    H: RefUnwindSafe,
    N: RefUnwindSafe

impl<H, N> Send for AuthoritySet<H, N> where
    H: Send,
    N: Send

impl<H, N> Sync for AuthoritySet<H, N> where
    H: Sync,
    N: Sync

impl<H, N> Unpin for AuthoritySet<H, N> where
    H: Unpin,
    N: Unpin

impl<H, N> UnwindSafe for AuthoritySet<H, N> where
    H: UnwindSafe,
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<S> Codec for S where
    S: Decode + Encode
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> DynClone for T where
    T: Clone
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode
[src]

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode
[src]

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: ToOwned + Encode
[src]

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[src]

impl<T> From<T> for T[src]

impl<S> FullCodec for S where
    S: Decode + FullEncode
[src]

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 
[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,