#[non_exhaustive]pub struct ContainerFileUpload {
pub filename: String,
pub content_type: String,
/* private fields */
}Expand description
EN: Uploadable container file bytes and multipart metadata. 中文:可上传容器文件字节和 multipart 元数据。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.filename: StringEN: Filename sent in the multipart part. 中文:multipart 分段中发送的文件名。
content_type: StringEN: Content type sent for the file part. 中文:文件分段发送的内容类型。
Implementations§
Source§impl ContainerFileUpload
impl ContainerFileUpload
Sourcepub fn from_bytes(
filename: impl Into<String>,
content: impl Into<Bytes>,
) -> Result<Self, LingerError>
pub fn from_bytes( filename: impl Into<String>, content: impl Into<Bytes>, ) -> Result<Self, LingerError>
EN: Creates an upload from already available bytes without copying them. 中文:通过已有字节创建上传对象,不复制这些字节。
Sourcepub fn content_type(
self,
content_type: impl Into<String>,
) -> Result<Self, LingerError>
pub fn content_type( self, content_type: impl Into<String>, ) -> Result<Self, LingerError>
EN: Sets the file part content type. 中文:设置文件分段的内容类型。
Trait Implementations§
Source§impl Clone for ContainerFileUpload
impl Clone for ContainerFileUpload
Source§fn clone(&self) -> ContainerFileUpload
fn clone(&self) -> ContainerFileUpload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerFileUpload
impl Debug for ContainerFileUpload
impl Eq for ContainerFileUpload
Source§impl PartialEq for ContainerFileUpload
impl PartialEq for ContainerFileUpload
Source§fn eq(&self, other: &ContainerFileUpload) -> bool
fn eq(&self, other: &ContainerFileUpload) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContainerFileUpload
Auto Trait Implementations§
impl !Freeze for ContainerFileUpload
impl RefUnwindSafe for ContainerFileUpload
impl Send for ContainerFileUpload
impl Sync for ContainerFileUpload
impl Unpin for ContainerFileUpload
impl UnsafeUnpin for ContainerFileUpload
impl UnwindSafe for ContainerFileUpload
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.