drogue_http_client/source.rs
1use crate::{Request, ResponseHandler};
2use heapless::ArrayLength;
3
4/// A source of data for the HTTP response
5pub trait Source {
6 type Error;
7
8 /// This will block, and forward data from this source to the request, until the request
9 /// is completed or a read error occurred.
10 fn pipe_data<IN, R>(&mut self, request: &mut Request<IN, R>) -> Result<(), Self::Error>
11 where
12 IN: ArrayLength<u8>,
13 R: ResponseHandler;
14}