pub struct BytesBody(pub Vec<u8>);Available on crate feature
api only.Expand description
Raw-bytes body type, used for some media endpoints.
Tuple Fields§
§0: Vec<u8>Trait Implementations§
Source§impl OutgoingBody for BytesBody
impl OutgoingBody for BytesBody
Source§fn content_type(&self) -> Option<HeaderValue>
fn content_type(&self) -> Option<HeaderValue>
The value for the
Content-Type HTTP header for this body, if there is one. Read moreSource§fn try_into_buf<T: Default + BufMut + AsRef<[u8]>>(
self,
) -> Result<T, Infallible>
fn try_into_buf<T: Default + BufMut + AsRef<[u8]>>( self, ) -> Result<T, Infallible>
Turn
self into a byte buffer (copying a raw body or serializing a JSON one).Auto Trait Implementations§
impl Freeze for BytesBody
impl RefUnwindSafe for BytesBody
impl Send for BytesBody
impl Sync for BytesBody
impl Unpin for BytesBody
impl UnsafeUnpin for BytesBody
impl UnwindSafe for BytesBody
Blanket Implementations§
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