pub struct Response<T> {
    pub body: T,
    pub status: u16,
    pub headers: Fields,
}

Fields§

§body: T§status: u16§headers: Fields

Trait Implementations§

source§

impl<T> Encode for Response<T>
where T: Stream<Item = StreamItem<Bytes, Option<Fields>>> + Send + 'static,

source§

fn encode<'life0, 'async_trait>( self, payload: &'life0 mut (impl 'async_trait + BufMut + Send) ) -> Pin<Box<dyn Future<Output = Result<Option<AsyncValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Response<T>
where T: RefUnwindSafe,

§

impl<T> Send for Response<T>
where T: Send,

§

impl<T> Sync for Response<T>
where T: Sync,

§

impl<T> Unpin for Response<T>
where T: Unpin,

§

impl<T> UnwindSafe for Response<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<R, Ctx> ReceiveContext<Ctx> for R
where R: Receive, Ctx: Send + Sync + 'static,

source§

fn receive_context<'life0, 'life1, 'async_trait, T>( _cx: &'life0 Ctx, payload: impl Buf + Send + 'async_trait + 'static, rx: &'life1 mut (impl Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'async_trait), sub: Option<AsyncSubscription<T>> ) -> Pin<Box<dyn Future<Output = Result<(R, Box<dyn Buf + Send>), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, T: Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'static + 'async_trait, R: 'async_trait,

source§

fn receive_context_sync<'life0, 'life1, 'async_trait>( cx: &'life0 Ctx, payload: impl Buf + Send + 'async_trait + 'static, rx: &'life1 mut (impl Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'async_trait) ) -> Pin<Box<dyn Future<Output = Result<(Self, Box<dyn Buf + Send>), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Send + 'async_trait,

source§

fn receive_list_context<'life0, 'life1, 'async_trait, T>( cx: &'life0 Ctx, payload: impl Buf + Send + 'async_trait + 'static, rx: &'life1 mut (impl Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'async_trait), sub: Option<AsyncSubscription<T>> ) -> Pin<Box<dyn Future<Output = Result<(Vec<Self>, Box<dyn Buf + Send>), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, T: Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'static + 'async_trait, Self: Send + 'async_trait,

Receive a list
source§

fn receive_tuple_context<'a, 'life0, 'async_trait, T, I>( cx: I, payload: impl Buf + Send + 'async_trait + 'static, rx: &'life0 mut (impl Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'async_trait), sub: Option<AsyncSubscription<T>> ) -> Pin<Box<dyn Future<Output = Result<(Vec<Self>, Box<dyn Buf + Send>), Error>> + Send + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, T: Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'static + 'async_trait, I: IntoIterator<Item = &'a Ctx> + Send + 'async_trait, <I as IntoIterator>::IntoIter: ExactSizeIterator + Send, Self: Send + 'async_trait,

Receive a tuple
source§

fn receive_stream_item_context<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( element_cx: Option<&'life0 Ctx>, end_cx: Option<&'life1 Ctx>, payload: impl Buf + Send + 'async_trait + 'static, rx: &'life2 mut (impl Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'async_trait), nested_element: Option<AsyncSubscription<DemuxStream>>, nested_end: &'life3 mut Option<AsyncSubscription<T>> ) -> Pin<Box<dyn Future<Output = Result<(StreamItem<Option<Self>, Option<Self>>, Box<dyn Buf + Send>), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, T: Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'static + 'async_trait, Self: Send + 'async_trait,

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more