pub struct MockTransactionConfig {
pub auth_claim: AuthClaim,
}Expand description
Configuration for a mocked transaction, applied when the handler is
created. Build one with TestEnvironment::transaction, or use
MockTransactionConfig::default for the standard setup.
This is the extension point for the mocked transaction context: new knobs (e.g. the source-tx hash) become fields here rather than new constructor overloads.
Fields§
§auth_claim: AuthClaimThe auth-claim attached to the mocked transaction, observed by the
contract under test (e.g. via get_auth_claim).
Implementations§
Source§impl MockTransactionConfig
impl MockTransactionConfig
Sourcepub fn default_auth_claim() -> AuthClaim
pub fn default_auth_claim() -> AuthClaim
A kSourceAddressAuthData claim with no allowed keys and zero required weight.
Trait Implementations§
Source§impl Clone for MockTransactionConfig
impl Clone for MockTransactionConfig
Source§fn clone(&self) -> MockTransactionConfig
fn clone(&self) -> MockTransactionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for MockTransactionConfig
impl Default for MockTransactionConfig
Source§fn default() -> MockTransactionConfig
fn default() -> MockTransactionConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MockTransactionConfig
impl RefUnwindSafe for MockTransactionConfig
impl Send for MockTransactionConfig
impl Sync for MockTransactionConfig
impl Unpin for MockTransactionConfig
impl UnsafeUnpin for MockTransactionConfig
impl UnwindSafe for MockTransactionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more