Skip to main content

Exchange

Trait Exchange 

Source
pub trait Exchange {
    // Required methods
    fn describe(&self) -> String;
    fn is_the_account(&self) -> bool;
    fn exchange(&self, call: Call<'_>) -> Result<Reply, String>;
}
Expand description

What answers a Call. Implemented by the wire and by every fake.

Required Methods§

Source

fn describe(&self) -> String

Source

fn is_the_account(&self) -> bool

Source

fn exchange(&self, call: Call<'_>) -> Result<Reply, String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<E: Exchange + ?Sized> Exchange for &E

A borrowed exchange is an exchange, so a test can keep its fake and read what it recorded after the procedure has moved on.

Source§

fn describe(&self) -> String

Source§

fn is_the_account(&self) -> bool

Source§

fn exchange(&self, call: Call<'_>) -> Result<Reply, String>

Implementors§