pub struct MockLayer2Protocol { /* private fields */ }Implementations§
Source§impl MockLayer2Protocol
impl MockLayer2Protocol
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new method can still be called
like <MockX as TraitY>::new
Source§impl MockLayer2Protocol
impl MockLayer2Protocol
Sourcepub fn expect_initialize(&mut self) -> &mut Expectation
pub fn expect_initialize(&mut self) -> &mut Expectation
Create an Expectation for mocking the initialize method
Sourcepub fn expect_connect(&mut self) -> &mut Expectation
pub fn expect_connect(&mut self) -> &mut Expectation
Create an Expectation for mocking the connect method
Sourcepub fn expect_get_state(&mut self) -> &mut Expectation
pub fn expect_get_state(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_state method
Sourcepub fn expect_submit_transaction(&mut self) -> &mut Expectation
pub fn expect_submit_transaction(&mut self) -> &mut Expectation
Create an Expectation for mocking the submit_transaction method
Sourcepub fn expect_check_transaction_status(&mut self) -> &mut Expectation
pub fn expect_check_transaction_status(&mut self) -> &mut Expectation
Create an Expectation for mocking the check_transaction_status method
Sourcepub fn expect_sync_state(&mut self) -> &mut Expectation
pub fn expect_sync_state(&mut self) -> &mut Expectation
Create an Expectation for mocking the sync_state method
Sourcepub fn expect_issue_asset(&mut self) -> &mut Expectation
pub fn expect_issue_asset(&mut self) -> &mut Expectation
Create an Expectation for mocking the issue_asset method
Sourcepub fn expect_transfer_asset(&mut self) -> &mut Expectation
pub fn expect_transfer_asset(&mut self) -> &mut Expectation
Create an Expectation for mocking the transfer_asset method
Sourcepub fn expect_verify_proof(&mut self) -> &mut Expectation
pub fn expect_verify_proof(&mut self) -> &mut Expectation
Create an Expectation for mocking the verify_proof method
Sourcepub fn expect_validate_state(&mut self) -> &mut Expectation
pub fn expect_validate_state(&mut self) -> &mut Expectation
Create an Expectation for mocking the validate_state method
Trait Implementations§
Source§impl Default for MockLayer2Protocol
impl Default for MockLayer2Protocol
Source§impl Layer2Protocol for MockLayer2Protocol
impl Layer2Protocol for MockLayer2Protocol
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProtocolState, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_state<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue_asset<'life0, 'async_trait>(
&'life0 self,
params: AssetParams,
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer_asset<'life0, 'async_trait>(
&'life0 self,
transfer: AssetTransfer,
) -> Pin<Box<dyn Future<Output = Result<TransferResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_proof<'life0, 'async_trait>(
&'life0 self,
proof: Proof,
) -> Pin<Box<dyn Future<Output = Result<VerificationResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state_data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<ValidationResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for MockLayer2Protocol
impl RefUnwindSafe for MockLayer2Protocol
impl Send for MockLayer2Protocol
impl Sync for MockLayer2Protocol
impl Unpin for MockLayer2Protocol
impl UnwindSafe for MockLayer2Protocol
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more