use std::pin::Pin;
use futures::Stream;
use crate::error::ProviderError;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct InvokeRequest {
pub method: String,
pub path: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}
pub type ByteStream = Pin<Box<dyn Stream<Item = Result<Vec<u8>, ProviderError>> + Send>>;
pub struct InvokeResponse {
pub status: u16,
pub body: ByteStream,
}
impl std::fmt::Debug for InvokeResponse {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.debug_struct("InvokeResponse").field("status", &self.status).finish_non_exhaustive()
}
}