pub trait StackMatches<N: Network> {
// Required methods
fn matches_value_type(
&self,
value: &Value<N>,
value_type: &ValueType<N>,
) -> Result<()>;
fn matches_register_type(
&self,
stack_value: &Value<N>,
register_type: &RegisterType<N>,
) -> Result<()>;
fn matches_external_record(
&self,
record: &Record<N, Plaintext<N>>,
locator: &Locator<N>,
) -> Result<()>;
fn matches_record(
&self,
record: &Record<N, Plaintext<N>>,
record_name: &Identifier<N>,
) -> Result<()>;
fn matches_plaintext(
&self,
plaintext: &Plaintext<N>,
plaintext_type: &PlaintextType<N>,
) -> Result<()>;
fn matches_future(
&self,
future: &Future<N>,
locator: &Locator<N>,
) -> Result<()>;
}
Required Methods§
Sourcefn matches_value_type(
&self,
value: &Value<N>,
value_type: &ValueType<N>,
) -> Result<()>
fn matches_value_type( &self, value: &Value<N>, value_type: &ValueType<N>, ) -> Result<()>
Checks that the given value matches the layout of the value type.
Sourcefn matches_register_type(
&self,
stack_value: &Value<N>,
register_type: &RegisterType<N>,
) -> Result<()>
fn matches_register_type( &self, stack_value: &Value<N>, register_type: &RegisterType<N>, ) -> Result<()>
Checks that the given stack value matches the layout of the register type.
Sourcefn matches_external_record(
&self,
record: &Record<N, Plaintext<N>>,
locator: &Locator<N>,
) -> Result<()>
fn matches_external_record( &self, record: &Record<N, Plaintext<N>>, locator: &Locator<N>, ) -> Result<()>
Checks that the given record matches the layout of the external record type.
Sourcefn matches_record(
&self,
record: &Record<N, Plaintext<N>>,
record_name: &Identifier<N>,
) -> Result<()>
fn matches_record( &self, record: &Record<N, Plaintext<N>>, record_name: &Identifier<N>, ) -> Result<()>
Checks that the given record matches the layout of the record type.
Sourcefn matches_plaintext(
&self,
plaintext: &Plaintext<N>,
plaintext_type: &PlaintextType<N>,
) -> Result<()>
fn matches_plaintext( &self, plaintext: &Plaintext<N>, plaintext_type: &PlaintextType<N>, ) -> Result<()>
Checks that the given plaintext matches the layout of the plaintext type.