Trait dash_sdk::mock::MockResponse

source ·
pub trait MockResponse {
    // Required methods
    fn mock_serialize(&self, mock_sdk: &MockDashPlatformSdk) -> Vec<u8> ;
    fn mock_deserialize(mock_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
       where Self: Sized;
}
Expand description

Trait implemented by objects that can be used in mock expectation responses.

§Panics

Can panic on errors.

Required Methods§

source

fn mock_serialize(&self, mock_sdk: &MockDashPlatformSdk) -> Vec<u8>

Serialize the object to save into expectations

§Panics

Can panic on errors.

source

fn mock_deserialize(mock_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

Deserialize the object from expectations

§Panics

Can panic on errors.

Implementations on Foreign Types§

source§

impl MockResponse for u8

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for u16

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for u32

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for u64

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for Contenders

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for ContestedResources

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for ElementFetchRequestItem

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for ExtendedEpochInfo

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for IdentityBalanceAndRevision

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for IdentityContractNonceFetcher

source§

fn mock_serialize(&self, _sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for IdentityNonceFetcher

source§

fn mock_serialize(&self, _sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for MasternodeProtocolVote

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for PrefundedSpecializedBalance

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for ProTxHash

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for ResourceVote

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for TotalCreditsInPlatform

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for Vote

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for VotePollsGroupedByTimestamp

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl MockResponse for Voters

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

impl<K: Ord + MockResponse, V: MockResponse> MockResponse for BTreeMap<K, V>

source§

fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

impl<T: MockResponse> MockResponse for Option<T>

source§

fn mock_deserialize(mock_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

fn mock_serialize(&self, mock_sdk: &MockDashPlatformSdk) -> Vec<u8>

source§

impl<T: MockResponse> MockResponse for Vec<T>

source§

fn mock_deserialize(mock_sdk: &MockDashPlatformSdk, buf: &[u8]) -> Self
where Self: Sized,

source§

fn mock_serialize(&self, mock_sdk: &MockDashPlatformSdk) -> Vec<u8>

Implementors§