pub struct FakeBackend { /* private fields */ }Expand description
Test backend with queued responses and stream chunks.
Implementations§
Source§impl FakeBackend
impl FakeBackend
pub fn new() -> Self
pub fn push_response(&self, response: ProviderResponse) -> &Self
pub fn push_error(&self, error: SynapticError) -> &Self
pub fn push_stream_chunks(&self, chunks: Vec<Bytes>) -> &Self
Trait Implementations§
Source§impl Default for FakeBackend
impl Default for FakeBackend
Source§impl ProviderBackend for FakeBackend
impl ProviderBackend for FakeBackend
fn send<'life0, 'async_trait>(
&'life0 self,
_request: ProviderRequest,
) -> Pin<Box<dyn Future<Output = Result<ProviderResponse, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_stream<'life0, 'async_trait>(
&'life0 self,
_request: ProviderRequest,
) -> Pin<Box<dyn Future<Output = Result<ByteStream, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for FakeBackend
impl !RefUnwindSafe for FakeBackend
impl Send for FakeBackend
impl Sync for FakeBackend
impl Unpin for FakeBackend
impl UnsafeUnpin for FakeBackend
impl !UnwindSafe for FakeBackend
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