ResponseExt

Trait ResponseExt 

Source
pub trait ResponseExt: Sealed {
    // Required methods
    fn into_event<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Event>> + 'async_trait>>
       where Self: 'async_trait;
    fn into_events<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + 'async_trait>>
       where Self: 'async_trait;
}
Available on crate feature reqwest only.
Expand description

Extension Trait for Response which acts as a wrapper for the function response_to_event().

This trait is sealed and cannot be implemented for types outside of this crate.

Required Methods§

Source

fn into_event<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Event>> + 'async_trait>>
where Self: 'async_trait,

Convert this Response to Event.

Source

fn into_events<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + 'async_trait>>
where Self: 'async_trait,

Convert this Response to a batched Vec<Event>.

Implementations on Foreign Types§

Source§

impl ResponseExt for Response

Source§

fn into_event<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Event>> + 'async_trait>>
where Self: 'async_trait,

Source§

fn into_events<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + 'async_trait>>
where Self: 'async_trait,

Implementors§