pub struct InMemoryFile {
pub file_name: Option<String>,
pub content_type: Option<String>,
pub data: Vec<u8>,
}Available on crate feature
multipart only.Expand description
Represents a file uploaded to the server and stored in memory.
Fields§
§file_name: Option<String>Original file name provided by the client, if any.
content_type: Option<String>MIME type of the uploaded file, if provided.
data: Vec<u8>File content stored as a byte array.
Trait Implementations§
Source§impl Debug for InMemoryFile
impl Debug for InMemoryFile
Source§impl<'de> Deserialize<'de> for InMemoryFile
impl<'de> Deserialize<'de> for InMemoryFile
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InMemoryFile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InMemoryFile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromMultipartField for InMemoryFile
impl FromMultipartField for InMemoryFile
Source§async fn from_field(field: Field<'_>) -> Result<InMemoryFile, Error>
async fn from_field(field: Field<'_>) -> Result<InMemoryFile, Error>
Creates an InMemoryFile instance from a multipart field.
Source§impl Serialize for InMemoryFile
impl Serialize for InMemoryFile
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for InMemoryFile
impl RefUnwindSafe for InMemoryFile
impl Send for InMemoryFile
impl Sync for InMemoryFile
impl Unpin for InMemoryFile
impl UnsafeUnpin for InMemoryFile
impl UnwindSafe for InMemoryFile
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more