Struct MockTransport
pub struct MockTransport { /* private fields */ }Expand description
Implementations§
§impl MockTransport
impl MockTransport
pub fn new() -> MockTransport
pub fn new() -> MockTransport
Create a new, disconnected mock transport.
pub fn script_recv(&mut self, data: Vec<u8>)
pub fn script_recv(&mut self, data: Vec<u8>)
Queue a message to be returned by Transport::recv.
Trait Implementations§
§impl Default for MockTransport
impl Default for MockTransport
§fn default() -> MockTransport
fn default() -> MockTransport
Returns the “default value” for a type. Read more
§impl Transport for MockTransport
impl Transport for MockTransport
§fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_url: &'life1 str,
_headers: Vec<(String, String)>,
) -> Pin<Box<dyn Future<Output = Result<(), <MockTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MockTransport: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_url: &'life1 str,
_headers: Vec<(String, String)>,
) -> Pin<Box<dyn Future<Output = Result<(), <MockTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MockTransport: 'async_trait,
Connect to the given URL with optional headers.
§fn send<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), <MockTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MockTransport: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), <MockTransport as Transport>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MockTransport: 'async_trait,
Send raw bytes.
Auto Trait Implementations§
impl Freeze for MockTransport
impl RefUnwindSafe for MockTransport
impl Send for MockTransport
impl Sync for MockTransport
impl Unpin for MockTransport
impl UnwindSafe for MockTransport
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