pub struct Binary(/* private fields */);Expand description
Binary response with application/octet-stream content type.
Use this for raw binary data that doesn’t have a specific MIME type.
§Examples
use fastapi_core::Binary;
let data = vec![0x00, 0x01, 0x02, 0x03];
let response = Binary::new(data);Implementations§
Trait Implementations§
Source§impl IntoResponse for Binary
impl IntoResponse for Binary
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Convert into a response.
Auto Trait Implementations§
impl Freeze for Binary
impl RefUnwindSafe for Binary
impl Send for Binary
impl Sync for Binary
impl Unpin for Binary
impl UnwindSafe for Binary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).