Type Alias SimulatorResponse

Source
pub type SimulatorResponse = ResponseWrapper<Response>;

Aliased Type§

struct SimulatorResponse(/* private fields */);

Implementations§

Source§

impl SimulatorResponse

Source

pub fn status(&self) -> StatusCode

Source

pub fn headers(&mut self) -> &BTreeMap<String, String>

Source

pub async fn text(self) -> Result<String, Error>

§Errors
  • If the text response fails
Source

pub async fn bytes(self) -> Result<Bytes, Error>

§Errors
  • If the bytes response fails
Source§

impl SimulatorResponse

Source

pub fn bytes_stream(self) -> impl Stream<Item = Result<Bytes, Error>>

§Errors
  • If the bytes_stream response fails
Source§

impl SimulatorResponse

Source

pub async fn json<T: DeserializeOwned>(self) -> Result<T, Error>

§Errors
  • If the json response fails

Trait Implementations§

Source§

impl GenericResponse for SimulatorResponse

Source§

fn status(&self) -> StatusCode

Source§

fn headers(&mut self) -> &BTreeMap<String, String>

Source§

fn text<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn bytes<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn bytes_stream( &mut self, ) -> Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>