pub struct ValidationProof {
    pub subject_id: DigestIdentifier,
    pub schema_id: String,
    pub namespace: String,
    pub name: String,
    pub subject_public_key: KeyIdentifier,
    pub governance_id: DigestIdentifier,
    pub genesis_governance_version: u64,
    pub sn: u64,
    pub prev_event_hash: DigestIdentifier,
    pub event_hash: DigestIdentifier,
    pub governance_version: u64,
}
Expand description

A struct representing a validation proof.

Fields§

§subject_id: DigestIdentifier

The identifier of the subject being validated.

§schema_id: String

The identifier of the schema used to validate the subject.

§namespace: String

The namespace of the subject being validated.

§name: String

The name of the subject being validated.

§subject_public_key: KeyIdentifier

The identifier of the public key of the subject being validated.

§governance_id: DigestIdentifier

The identifier of the governance contract associated with the subject being validated.

§genesis_governance_version: u64

The version of the governance contract that created the subject being validated.

§sn: u64

The sequence number of the subject being validated.

§prev_event_hash: DigestIdentifier

The identifier of the previous event in the validation chain.

§event_hash: DigestIdentifier

The identifier of the current event in the validation chain.

§governance_version: u64

The version of the governance contract used to validate the subject.

Implementations§

source§

impl ValidationProof

source

pub fn new_from_genesis_event( start_request: StartRequest, event_hash: DigestIdentifier, governance_version: u64, subject_id: DigestIdentifier ) -> Self

source

pub fn new_from_transfer_event( subject: &Subject, sn: u64, prev_event_hash: DigestIdentifier, event_hash: DigestIdentifier, governance_version: u64, subject_public_key: KeyIdentifier ) -> Self

source

pub fn new( subject: &Subject, sn: u64, prev_event_hash: DigestIdentifier, event_hash: DigestIdentifier, governance_version: u64 ) -> Self

source

pub fn get_metadata(&self) -> Metadata

source

pub fn is_similar(&self, other: &ValidationProof) -> bool

Trait Implementations§

source§

impl BorshDeserialize for ValidationProofwhere DigestIdentifier: BorshDeserialize, String: BorshDeserialize, KeyIdentifier: BorshDeserialize, u64: BorshDeserialize,

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,

source§

impl BorshSerialize for ValidationProofwhere DigestIdentifier: BorshSerialize, String: BorshSerialize, KeyIdentifier: BorshSerialize, u64: BorshSerialize,

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

§

fn try_to_vec(&self) -> Result<Vec<u8, Global>, Error>

Serialize this instance into a vector of bytes.
source§

impl Clone for ValidationProof

source§

fn clone(&self) -> ValidationProof

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ValidationProof

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ValidationProof

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<ValidationProof> for ValidationProof

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl Serialize for ValidationProof

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ValidationProof

source§

impl StructuralEq for ValidationProof

source§

impl StructuralPartialEq for ValidationProof

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,