pub struct Upload { /* private fields */ }
Expand description
A uploaded file for multipart.
Implementations
sourceimpl Upload
impl Upload
sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Get the content type of the field.
sourcepub async fn into_vec(self) -> Result<Vec<u8>, IoError>
pub async fn into_vec(self) -> Result<Vec<u8>, IoError>
Consumes this body object to return a Vec<u8>
that contains all
data.
sourcepub async fn into_string(self) -> Result<String, IoError>
pub async fn into_string(self) -> Result<String, IoError>
Consumes this body object to return a String
that contains all data.
sourcepub fn into_async_read(self) -> impl AsyncRead + Unpin + Send + 'static
pub fn into_async_read(self) -> impl AsyncRead + Unpin + Send + 'static
Consumes this body object to return a reader.
Trait Implementations
sourceimpl ParseFromMultipartField for Upload
impl ParseFromMultipartField for Upload
sourcefn parse_from_multipart<'async_trait>(
field: Option<PoemField>
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
fn parse_from_multipart<'async_trait>(
field: Option<PoemField>
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
Parse from multipart field.
sourcefn parse_from_repeated_field<'async_trait>(
self,
_field: PoemField
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
fn parse_from_repeated_field<'async_trait>(
self,
_field: PoemField
) -> Pin<Box<dyn Future<Output = ParseResult<Self>> + Send + 'async_trait>> where
Self: Send + 'async_trait,
Parse from repeated multipart field.
sourceimpl Type for Upload
impl Type for Upload
sourceconst IS_REQUIRED: bool
const IS_REQUIRED: bool
If it is true
, it means that this type is required.
type RawValueType = Self
type RawValueType = Self
The raw type used for validator. Read more
type RawElementValueType = Self
type RawElementValueType = Self
The raw element type used for validator.
sourcefn schema_ref() -> MetaSchemaRef
fn schema_ref() -> MetaSchemaRef
Get schema reference of this type.
sourcefn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
sourcefn raw_element_iter<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Self::RawElementValueType> + 'a>
fn raw_element_iter<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Self::RawElementValueType> + 'a>
Returns an iterator for traversing the elements.
Auto Trait Implementations
impl !RefUnwindSafe for Upload
impl Send for Upload
impl Sync for Upload
impl Unpin for Upload
impl UnwindSafe for Upload
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more