pub struct MockClient {
pub ipc_to_send: Arc<RwLock<Vec<Message>>>,
/* private fields */
}
Fields§
§ipc_to_send: Arc<RwLock<Vec<Message>>>
Implementations§
Source§impl MockClient
impl MockClient
pub fn new(_config: ClientConfig) -> Self
pub async fn run(&mut self) -> Result<()>
pub fn new_message(&self, msg_type: i32, data: Bytes) -> Message
pub async fn recv_message(&self) -> Option<Message>
pub async fn send_message( &self, message: Message, ) -> Result<(), SendError<Message>>
pub async fn mock_tx_send( &self, message: Message, ) -> Result<(), SendError<Message>>
pub async fn send_status(&self, status: Status)
pub async fn get_status(&mut self) -> Status
Trait Implementations§
Source§impl Clone for MockClient
impl Clone for MockClient
Source§fn clone(&self) -> MockClient
fn clone(&self) -> MockClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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