[−][src]Struct grin_wallet_impls::test_framework::WalletProxy
communicates with a chain instance or other wallet listener APIs via message queues
Fields
chain_dir: String
directory to create the chain in
chain: Arc<Chain>
handle to chain itself
wallets: HashMap<String, (Sender<WalletProxyMessage>, Arc<Mutex<dyn WalletInst<LocalWalletClient, K>>>)>
list of interested wallets
tx: Sender<WalletProxyMessage>
simulate json send to another client address, method, payload (simulate HTTP request)
rx: Receiver<WalletProxyMessage>
simulate json receiving
running: Arc<AtomicBool>
queue control
Methods
impl<C, K> WalletProxy<C, K> where
C: NodeClient,
K: Keychain,
[src]
C: NodeClient,
K: Keychain,
pub fn new(chain_dir: &str) -> Self
[src]
Create a new client that will communicate with the given grin node
pub fn add_wallet(
&mut self,
addr: &str,
tx: Sender<WalletProxyMessage>,
wallet: Arc<Mutex<dyn WalletInst<LocalWalletClient, K>>>
)
[src]
&mut self,
addr: &str,
tx: Sender<WalletProxyMessage>,
wallet: Arc<Mutex<dyn WalletInst<LocalWalletClient, K>>>
)
Add wallet with a given "address"
pub fn stop(&mut self)
[src]
pub fn run(&mut self) -> Result<(), Error>
[src]
Run the incoming message queue and respond more or less synchronously
Auto Trait Implementations
impl<C, K> Send for WalletProxy<C, K>
impl<C, K> Unpin for WalletProxy<C, K> where
C: Unpin,
K: Unpin,
C: Unpin,
K: Unpin,
impl<C, K> !Sync for WalletProxy<C, K>
impl<C, K> !UnwindSafe for WalletProxy<C, K>
impl<C, K> !RefUnwindSafe for WalletProxy<C, K>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Erased for T
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,