pub struct MockStreamingClient {
pub sse_bytes: Bytes,
}Available on crate feature
test-utils only.Expand description
A mock HTTP client that returns pre-built SSE bytes from send_streaming.
send and send_multipart always return NOT_IMPLEMENTED.
Fields§
§sse_bytes: BytesBytes returned as a single streaming response chunk.
Trait Implementations§
Source§impl Clone for MockStreamingClient
impl Clone for MockStreamingClient
Source§impl Debug for MockStreamingClient
impl Debug for MockStreamingClient
Source§impl Default for MockStreamingClient
impl Default for MockStreamingClient
Source§impl HttpClientExt for MockStreamingClient
impl HttpClientExt for MockStreamingClient
Source§fn send<T, U>(
&self,
_req: Request<T>,
) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
fn send<T, U>( &self, _req: Request<T>, ) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
Sends a request and returns headers with a lazy body converted from bytes to
U.Source§fn send_multipart<U>(
&self,
_req: Request<MultipartForm>,
) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
fn send_multipart<U>( &self, _req: Request<MultipartForm>, ) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
Sends a multipart request and returns headers with a lazy body converted to
U.Source§fn send_streaming<T>(
&self,
_req: Request<T>,
) -> impl Future<Output = Result<StreamingResponse>> + WasmCompatSend
fn send_streaming<T>( &self, _req: Request<T>, ) -> impl Future<Output = Result<StreamingResponse>> + WasmCompatSend
Sends a request and returns headers with a stream of transport byte chunks.
Auto Trait Implementations§
impl !Freeze for MockStreamingClient
impl RefUnwindSafe for MockStreamingClient
impl Send for MockStreamingClient
impl Sync for MockStreamingClient
impl Unpin for MockStreamingClient
impl UnsafeUnpin for MockStreamingClient
impl UnwindSafe for MockStreamingClient
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