pub struct MockClient { /* private fields */ }
Implementations§
Source§impl MockClient
impl MockClient
pub async fn new() -> Self
pub async fn mock_response( &mut self, method_name: &str, params: Value, result: Value, )
pub async fn mock_response_error(&mut self, error: Value)
pub async fn mock_response_ignore_param( &mut self, method_name: &str, result: Value, ) -> &mut Self
pub async fn mock_response_with_file( &mut self, method_name: &str, response_file: &str, params: Value, ) -> &mut Self
pub async fn mock_response_with_file_ignore_param( &mut self, method_name: &str, response_file: &str, ) -> &mut Self
pub async fn mock_response_for_balance_of( &mut self, contract_hash: &str, account_script_hash: &str, response_file: &str, ) -> &mut Self
pub async fn mock_default_responses(&mut self) -> &mut Self
pub async fn mock_invoke_script( &mut self, result: InvocationResult, ) -> &mut Self
pub async fn mock_get_block_count(&mut self, block_count: u32) -> &mut Self
pub async fn mock_send_raw_transaction( &mut self, result: RawTransaction, ) -> &mut Self
pub async fn mock_get_version(&mut self, result: NeoVersion) -> &mut Self
pub async fn mock_invoke_function( &mut self, result: InvocationResult, ) -> &mut Self
pub async fn mock_get_application_log( &mut self, result: Option<ApplicationLog>, ) -> &mut Self
pub async fn mount_mocks(&mut self) -> &mut Self
pub fn url(&self) -> Url
pub fn into_client(&self) -> RpcClient<HttpProvider>
pub fn server(&self) -> &MockServer
Auto Trait Implementations§
impl Freeze for MockClient
impl !RefUnwindSafe for MockClient
impl Send for MockClient
impl Sync for MockClient
impl Unpin for MockClient
impl !UnwindSafe for MockClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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