referrerpolicy=no-referrer-when-downgrade
sp_consensus_grandpa

Type Alias OpaqueKeyOwnershipProof

Source
pub type OpaqueKeyOwnershipProof = OpaqueValue;
Expand description

An opaque type used to represent the key ownership proof at the runtime API boundary. The inner value is an encoded representation of the actual key ownership proof which will be parameterized when defining the runtime. At the runtime API boundary this type is unknown and as such we keep this opaque representation, implementors of the runtime API will have to make sure that all usages of OpaqueKeyOwnershipProof refer to the same type.

Aliased Type§

struct OpaqueKeyOwnershipProof(/* private fields */);

Implementations

§

impl OpaqueValue

pub fn new(inner: Vec<u8>) -> OpaqueValue

Create a new OpaqueValue using the given encoded representation.

pub fn decode<T>(&self) -> Option<T>
where T: Decode,

Try to decode this OpaqueValue into the given concrete type.

Trait Implementations

§

impl Decode for OpaqueValue

§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<OpaqueValue, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
§

impl Encode for OpaqueValue

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
where __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl PartialEq for OpaqueValue

§

fn eq(&self, other: &OpaqueValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl TypeInfo for OpaqueValue

§

type Identity = OpaqueValue

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl EncodeLike for OpaqueValue

§

impl StructuralPartialEq for OpaqueValue