pub enum OutgoingBodyContent<const N: usize = { 1024 * 10 }> {
Empty,
Json(String),
Stream(MediaUpload<dyn MediaUploadStream>),
AsyncStream(AsyncMediaUpload<dyn AsyncMediaUploadStream>),
Multipart(MultipartBody),
}Variants§
Empty
Json(String)
Stream(MediaUpload<dyn MediaUploadStream>)
AsyncStream(AsyncMediaUpload<dyn AsyncMediaUploadStream>)
Multipart(MultipartBody)
Implementations§
Source§impl OutgoingBodyContent
impl OutgoingBodyContent
pub fn from_body_and_media( body: Option<impl Into<String>>, media: Option<MediaUpload<dyn MediaUploadStream>>, ) -> Self
pub fn get_content_type(&self) -> Option<String>
pub fn get_length(&self) -> u64
Trait Implementations§
Source§impl Body for OutgoingBodyContent
impl Body for OutgoingBodyContent
Source§impl<const N: usize> Debug for OutgoingBodyContent<N>
impl<const N: usize> Debug for OutgoingBodyContent<N>
Source§impl<const N: usize> Default for OutgoingBodyContent<N>
impl<const N: usize> Default for OutgoingBodyContent<N>
Source§fn default() -> OutgoingBodyContent<N>
fn default() -> OutgoingBodyContent<N>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<const N: usize = { 1024 * 10 }> !RefUnwindSafe for OutgoingBodyContent<N>
impl<const N: usize = { 1024 * 10 }> !UnwindSafe for OutgoingBodyContent<N>
impl<const N: usize> Freeze for OutgoingBodyContent<N>
impl<const N: usize> Send for OutgoingBodyContent<N>
impl<const N: usize> Sync for OutgoingBodyContent<N>
impl<const N: usize> Unpin for OutgoingBodyContent<N>
impl<const N: usize> UnsafeUnpin for OutgoingBodyContent<N>
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