pub struct Upload {
pub bytes: Vec<u8>,
pub filename: String,
pub content_type: Option<String>,
pub kind: UploadKind,
pub url: Option<Url>,
}Expand description
调用方上传的文件。字节只有这一份,交给引擎后不再复制。
Fields§
§bytes: Vec<u8>§filename: Stringmultipart 里的文件名(没有时为 upload),作为文档的 metadata.sourceURL。
content_type: Option<String>multipart 里这个文件的 Content-Type。
kind: UploadKind§url: Option<Url>调用方给的页面原地址(url 字段):HTML 的相对链接按它解析,也作为 metadata.sourceURL。
只用来解析地址,不会去抓。
Trait Implementations§
impl Eq for Upload
impl StructuralPartialEq for Upload
Auto Trait Implementations§
impl Freeze for Upload
impl RefUnwindSafe for Upload
impl Send for Upload
impl Sync for Upload
impl Unpin for Upload
impl UnsafeUnpin for Upload
impl UnwindSafe for Upload
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.