pub struct StreamBodyAs<'a> { /* private fields */ }
Implementations§
Source§impl<'a> StreamBodyAs<'a>
impl<'a> StreamBodyAs<'a>
Sourcepub fn new<S, T, FMT, E>(stream_format: FMT, stream: S) -> Self
pub fn new<S, T, FMT, E>(stream_format: FMT, stream: S) -> Self
Create a new StreamBodyWith
providing a stream of your objects in the specified format.
pub fn with_options<S, T, FMT, E>( stream_format: FMT, stream: S, options: StreamBodyAsOptions, ) -> Self
pub fn headers(self, headers: HeaderMap) -> Self
pub fn header<K, V>(self, key: K, value: V) -> Self
Source§impl<'a> StreamBodyAs<'a>
impl<'a> StreamBodyAs<'a>
pub fn json_array<S, T>(stream: S) -> Self
pub fn json_array_with_errors<S, T, E>(stream: S) -> Self
pub fn json_array_with_envelope<S, T, EN>( stream: S, envelope: EN, array_field: &str, ) -> Self
pub fn json_array_with_envelope_errors<S, T, E, EN>( stream: S, envelope: EN, array_field: &str, ) -> Self
pub fn json_nl<S, T>(stream: S) -> Self
pub fn json_nl_with_errors<S, T, E>(stream: S) -> Self
Source§impl<'a> StreamBodyAs<'a>
impl<'a> StreamBodyAs<'a>
Source§impl<'a> StreamBodyAs<'a>
impl<'a> StreamBodyAs<'a>
Source§impl<'a> StreamBodyAs<'a>
impl<'a> StreamBodyAs<'a>
Source§impl<'a> StreamBodyAs<'a>
impl<'a> StreamBodyAs<'a>
pub fn arrow_ipc<S>(schema: SchemaRef, stream: S) -> Self
pub fn arrow_ipc_with_errors<S, E>(schema: SchemaRef, stream: S) -> Self
pub fn arrow_ipc_with_options<S>( schema: SchemaRef, stream: S, options: IpcWriteOptions, ) -> Self
pub fn arrow_ipc_with_options_errors<S, E>( schema: SchemaRef, stream: S, options: IpcWriteOptions, ) -> Self
Trait Implementations§
Source§impl<'a> Body for StreamBodyAs<'a>
impl<'a> Body for StreamBodyAs<'a>
Source§impl<'a> Debug for StreamBodyAs<'a>
impl<'a> Debug for StreamBodyAs<'a>
Source§impl IntoResponse for StreamBodyAs<'static>
impl IntoResponse for StreamBodyAs<'static>
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl<'a> Freeze for StreamBodyAs<'a>
impl<'a> !RefUnwindSafe for StreamBodyAs<'a>
impl<'a> Send for StreamBodyAs<'a>
impl<'a> !Sync for StreamBodyAs<'a>
impl<'a> Unpin for StreamBodyAs<'a>
impl<'a> !UnwindSafe for StreamBodyAs<'a>
Blanket Implementations§
Source§impl<T> BodyExt for T
impl<T> BodyExt for T
Source§fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
Returns a future that resolves to the next
Frame
, if any.Source§fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
Maps this body’s frame to a different kind.
Source§fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
Maps this body’s error value to a different value.
Source§fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
Turn this body into a boxed trait object that is !Sync.
Source§fn collect(self) -> Collect<Self>where
Self: Sized,
fn collect(self) -> Collect<Self>where
Self: Sized,
Turn this body into
Collected
body which will collect all the DATA frames
and trailers.Source§fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
Add trailers to the body. Read more
Source§fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
fn into_data_stream(self) -> BodyDataStream<Self>where
Self: Sized,
Turn this body into
BodyDataStream
.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more