pub trait DemandFluency<T> {
// Required methods
fn demand_instruction_error(self, expected_error: InstructionError);
fn demand_instruction_error_at_index(
self,
expected_index: u8,
expected_error: InstructionError,
);
fn demand_logs_contain(self, expected: &str);
fn demand_system_error(self, expected_error: SystemError);
fn demand_system_error_at_index(
self,
expected_index: u8,
expected_error: SystemError,
);
fn demand_transaction_error(self, expected_error: TransactionError);
}Expand description
Trait for fluent assertions on transaction results.
This trait extends TransactionResult with assertion methods that provide
detailed error messages when conditions are not met. The fluent API allows
for readable test code that chains naturally from transaction execution.
See the working examples in the repository for complete usage patterns.
Required Methods§
fn demand_instruction_error(self, expected_error: InstructionError)
fn demand_instruction_error_at_index( self, expected_index: u8, expected_error: InstructionError, )
fn demand_logs_contain(self, expected: &str)
fn demand_system_error(self, expected_error: SystemError)
fn demand_system_error_at_index( self, expected_index: u8, expected_error: SystemError, )
fn demand_transaction_error(self, expected_error: TransactionError)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".