Trait ValidityCondition

Source
pub trait ValidityCondition:
    Serialize
    + DeserializeOwned
    + BorshDeserialize
    + BorshSerialize
    + Debug
    + Clone
    + Copy
    + PartialEq
    + Send
    + Sync
    + Eq {
    type Error: Into<Error>;

    // Required method
    fn combine<H: Digest>(&self, rhs: Self) -> Result<Self, Self::Error>;
}
Expand description

This trait is implemented on the struct/enum which expresses the validity condition

Required Associated Types§

Source

type Error: Into<Error>

The error type returned when two ValidityConditions cannot be combined.

Required Methods§

Source

fn combine<H: Digest>(&self, rhs: Self) -> Result<Self, Self::Error>

Combine two conditions into one (typically run inside a recursive proof). Returns an error if the two conditions cannot be combined

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.

Implementors§